playbook_ui 14.17.0.pre.alpha.playcdntest7233 → 14.17.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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -70
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +2 -83
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +7 -20
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_background/_background.scss +0 -26
- data/app/pb_kits/playbook/pb_background/_background.tsx +3 -5
- data/app/pb_kits/playbook/pb_background/background.test.js +0 -5
- data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +7 -14
- data/app/pb_kits/playbook/pb_contact/contact.test.js +7 -7
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +34 -34
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +0 -16
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +11 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +7 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +24 -28
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +2 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +1 -1
- data/app/pb_kits/playbook/pb_draggable/_draggable.scss +20 -43
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +17 -58
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +105 -102
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +3 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +48 -50
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.jsx → _draggable_with_table_react.jsx} +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +6 -9
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -4
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +3 -71
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +3 -4
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +3 -3
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +4 -3
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +3 -2
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +0 -22
- data/app/pb_kits/playbook/pb_icon/icon.test.js +9 -9
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_value/icon_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_label_value/label_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.scss +0 -58
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +7 -20
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_layout/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_layout/layout.test.js +0 -4
- data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
- data/app/pb_kits/playbook/pb_link/link.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -2
- data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +3 -5
- data/app/pb_kits/playbook/pb_stat_change/stat_change.test.js +4 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_table/styles/_headers.scss +7 -19
- data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
- data/app/pb_kits/playbook/pb_table/table.rb +1 -13
- data/app/pb_kits/playbook/pb_table/table_header.rb +1 -13
- data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +282 -0
- data/app/pb_kits/playbook/pb_tooltip/index.js +56 -183
- data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +5 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
- data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +5 -2
- data/app/pb_kits/playbook/pb_user/user.html.erb +6 -1
- data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +6 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
- data/app/pb_kits/playbook/utilities/object.test.js +1 -149
- data/app/pb_kits/playbook/utilities/object.ts +42 -124
- data/dist/chunks/{_typeahead-C2GOKWtm.js → _typeahead-N-EFroAX.js} +3 -3
- data/dist/chunks/_weekday_stacked-Db780bKR.js +45 -0
- data/dist/chunks/lib-Co5y3V4K.js +29 -0
- data/dist/chunks/{pb_form_validation-BvNy9Bd6.js → pb_form_validation-DMajaRt3.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/kit_base.rb +4 -4
- data/lib/playbook/version.rb +2 -2
- metadata +19 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +0 -90
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +0 -3
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +0 -35
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +0 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +0 -110
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +0 -5
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +0 -190
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +0 -5
- data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +0 -90
- data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +0 -57
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +0 -36
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +0 -1
- data/dist/chunks/_weekday_stacked-CFGTPT0O.js +0 -45
- data/dist/chunks/lib-BGzBzFZX.js +0 -29
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_react.md → _draggable_default.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.html.erb → _draggable_default_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_react.md → _draggable_multiple_containers.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.html.erb → _draggable_multiple_containers_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_react.md → _draggable_with_cards.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.html.erb → _draggable_with_cards_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_react.md → _draggable_with_list.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.html.erb → _draggable_with_list_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_react.md → _draggable_with_selectable_list.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.html.erb → _draggable_with_selectable_list_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_rails.md → _draggable_with_table.md} +0 -0
@@ -10,8 +10,6 @@ $list-header-height: $space_lg;
|
|
10
10
|
$list-footer-height: $space_lg;
|
11
11
|
$list-border-radius: $border_rad_lighter;
|
12
12
|
$card-border-radius: $border_rad_lightest;
|
13
|
-
$bracket-connector-width: 45px;
|
14
|
-
$bracket-border-width: 4px;
|
15
13
|
|
16
14
|
|
17
15
|
[class^=pb_layout_kit] {
|
@@ -170,62 +168,6 @@ $bracket-border-width: 4px;
|
|
170
168
|
}
|
171
169
|
}
|
172
170
|
|
173
|
-
&[class*=_bracket]{
|
174
|
-
display: flex;
|
175
|
-
overflow-x: scroll;
|
176
|
-
|
177
|
-
div.layout_round {
|
178
|
-
display: flex;
|
179
|
-
flex-direction: column;
|
180
|
-
justify-content: space-around;
|
181
|
-
flex-grow: 1;
|
182
|
-
}
|
183
|
-
|
184
|
-
.connector_container {
|
185
|
-
display: flex;
|
186
|
-
flex-direction: column;
|
187
|
-
justify-content: space-around;
|
188
|
-
}
|
189
|
-
.right_connector {
|
190
|
-
border-top: $bracket-border-width solid $border_light;
|
191
|
-
width: $bracket-connector-width;
|
192
|
-
margin-left: $bracket-connector-width;
|
193
|
-
}
|
194
|
-
|
195
|
-
.layout_round .layout_game {
|
196
|
-
position: relative;
|
197
|
-
}
|
198
|
-
|
199
|
-
.half_box {
|
200
|
-
content: '';
|
201
|
-
position: absolute;
|
202
|
-
top: calc(50% - $bracket-border-width / 2);
|
203
|
-
height: calc(100% + $bracket-border-width);
|
204
|
-
width: $bracket-connector-width;
|
205
|
-
right: -$bracket-connector-width;
|
206
|
-
border-top-right-radius: $border_radius_lg;
|
207
|
-
border-bottom-right-radius: $border_radius_lg;
|
208
|
-
border-top: $bracket-border-width solid $border_light;
|
209
|
-
border-bottom: $bracket-border-width solid $border_light;
|
210
|
-
border-right: $bracket-border-width solid $border_light;
|
211
|
-
}
|
212
|
-
|
213
|
-
.layout_round_label {
|
214
|
-
display: none;
|
215
|
-
}
|
216
|
-
|
217
|
-
@media (max-width: $screen-md-max) {
|
218
|
-
flex-direction: column;
|
219
|
-
.layout_round_label {
|
220
|
-
display: block;
|
221
|
-
}
|
222
|
-
.layout_round .layout_game::after,
|
223
|
-
.connector_container,
|
224
|
-
.half_box {
|
225
|
-
display: none !important;
|
226
|
-
}
|
227
|
-
}
|
228
|
-
}
|
229
171
|
|
230
172
|
&[class*=_sidebar]{
|
231
173
|
$layout_sizes: (
|
@@ -4,9 +4,6 @@ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../uti
|
|
4
4
|
|
5
5
|
import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
|
6
6
|
|
7
|
-
import { Round, RoundLabel } from "./subcomponents/_round";
|
8
|
-
import Game from "./subcomponents/_game";
|
9
|
-
|
10
7
|
type LayoutPropTypes = {
|
11
8
|
aria?: {[key: string]: string},
|
12
9
|
children?: React.ReactChild[] | React.ReactChild,
|
@@ -21,7 +18,7 @@ type LayoutPropTypes = {
|
|
21
18
|
size?: "xs" | "sm" | "md" | "base" | "lg" | "xl",
|
22
19
|
variant?: "light" | "dark" | "gradient",
|
23
20
|
transparent?: boolean,
|
24
|
-
layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry"
|
21
|
+
layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry",
|
25
22
|
} & GlobalProps
|
26
23
|
|
27
24
|
type LayoutSideProps = {
|
@@ -143,7 +140,7 @@ const Layout = (props: LayoutPropTypes) => {
|
|
143
140
|
const htmlProps = buildHtmlProps(htmlOptions)
|
144
141
|
|
145
142
|
const layoutCss =
|
146
|
-
|
143
|
+
layout == 'collection'
|
147
144
|
? `pb_layout_kit_${layout}`
|
148
145
|
: layout == 'kanban'
|
149
146
|
? `pb_layout_kit_${layout}${responsiveClass}`
|
@@ -154,9 +151,11 @@ const Layout = (props: LayoutPropTypes) => {
|
|
154
151
|
})
|
155
152
|
|
156
153
|
const layoutCollapseCss =
|
157
|
-
|
154
|
+
layout == 'collection'
|
158
155
|
? ''
|
159
|
-
:
|
156
|
+
: layout == 'kanban'
|
157
|
+
? ''
|
158
|
+
: buildCss('layout', position, 'collapse', collapse)
|
160
159
|
|
161
160
|
const layoutChildren = React.Children.toArray(children)
|
162
161
|
|
@@ -176,15 +175,6 @@ const Layout = (props: LayoutPropTypes) => {
|
|
176
175
|
(child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
|
177
176
|
)
|
178
177
|
|
179
|
-
const numberOfRounds = Array.isArray(nonSideChildren) ? React.Children.toArray(children).filter(
|
180
|
-
(child) => {
|
181
|
-
return (child as React.ReactElement).type === Layout.Round;
|
182
|
-
}
|
183
|
-
).length : 0
|
184
|
-
const bracketChildren = nonSideChildren.map(child =>
|
185
|
-
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
|
186
|
-
)
|
187
|
-
|
188
178
|
const filteredProps = {...props}
|
189
179
|
delete filteredProps?.position
|
190
180
|
|
@@ -206,7 +196,7 @@ const Layout = (props: LayoutPropTypes) => {
|
|
206
196
|
style={dynamicInlineProps}
|
207
197
|
>
|
208
198
|
{subComponentTags('Side')}
|
209
|
-
{
|
199
|
+
{nonSideChildren}
|
210
200
|
</div>
|
211
201
|
)
|
212
202
|
}
|
@@ -216,8 +206,5 @@ Layout.Body = Body
|
|
216
206
|
Layout.Item = Item
|
217
207
|
Layout.Header = Header
|
218
208
|
Layout.Footer = Footer
|
219
|
-
Layout.Round = Round
|
220
|
-
Layout.Game = Game
|
221
|
-
Layout.RoundLabel = RoundLabel
|
222
209
|
|
223
210
|
export default Layout
|
@@ -7,5 +7,4 @@ export { default as LayoutKanbanResponsive } from './_layout_kanban_responsive.j
|
|
7
7
|
export { default as LayoutCollectionDetail } from './_layout_collection_detail.jsx'
|
8
8
|
export { default as LayoutContent } from './_layout_content.jsx'
|
9
9
|
export { default as LayoutMasonry } from './_layout_masonry.jsx'
|
10
|
-
export { default as LayoutBracket } from './_layout_bracket.jsx'
|
11
10
|
|
@@ -82,10 +82,6 @@ test("render all layout variants", () => {
|
|
82
82
|
layout: "masonry",
|
83
83
|
expected: "pb_layout_kit_masonry_size_md_left_light",
|
84
84
|
},
|
85
|
-
{
|
86
|
-
layout: "bracket",
|
87
|
-
expected: "pb_layout_kit_bracket",
|
88
|
-
},
|
89
85
|
]
|
90
86
|
|
91
87
|
testValues.forEach(({ layout, expected }) => {
|
@@ -73,7 +73,7 @@ test('adds icon', () => {
|
|
73
73
|
|
74
74
|
const kit = screen.getByTestId('icon-test')
|
75
75
|
|
76
|
-
const icon = kit.querySelector('.
|
76
|
+
const icon = kit.querySelector('.pb_icon_kit')
|
77
77
|
expect(icon).toBeInTheDocument();
|
78
78
|
})
|
79
79
|
|
@@ -87,7 +87,7 @@ test('adds icon right', () => {
|
|
87
87
|
|
88
88
|
const kit = screen.getByTestId('icon-right-test')
|
89
89
|
|
90
|
-
const icon = kit.querySelector('.
|
90
|
+
const icon = kit.querySelector('.pb_icon_kit')
|
91
91
|
expect(icon).toBeInTheDocument();
|
92
92
|
})
|
93
93
|
|
@@ -7,12 +7,11 @@ import {
|
|
7
7
|
buildDataProps,
|
8
8
|
buildHtmlProps,
|
9
9
|
} from "../utilities/props";
|
10
|
-
import { cloneDeep } from "../utilities/object";
|
11
|
-
|
12
10
|
import Icon from "../pb_icon/_icon";
|
13
11
|
import FormPill from "../pb_form_pill/_form_pill";
|
14
12
|
import Body from "../pb_body/_body";
|
15
13
|
import Caption from "../pb_caption/_caption";
|
14
|
+
import { cloneDeep } from "lodash";
|
16
15
|
import MultiLevelSelectOptions from "./multi_level_select_options";
|
17
16
|
import MultiLevelSelectContext from "./context";
|
18
17
|
|
@@ -95,13 +95,11 @@ test('should not have a left border', () => {
|
|
95
95
|
test('should have a right icon', () => {
|
96
96
|
render(<NavDefault iconRight="angle-down" />)
|
97
97
|
const kit = screen.getByTestId(itemTestId)
|
98
|
-
|
99
|
-
expect(icon).toBeInTheDocument()
|
98
|
+
expect(kit).toContainHTML('<i class="pb_icon_kit far pb_nav_list_item_icon_right fa-fw fa-angle-down" />')
|
100
99
|
})
|
101
100
|
|
102
101
|
test('should have a left icon', () => {
|
103
|
-
render(<NavDefault iconLeft="
|
102
|
+
render(<NavDefault iconLeft="users-class" />)
|
104
103
|
const kit = screen.getByTestId(itemTestId)
|
105
|
-
|
106
|
-
expect(icon).toBeInTheDocument()
|
104
|
+
expect(kit).toContainHTML('<i class="pb_icon_kit far pb_nav_list_item_icon_left fa-fw fa-users-class" />')
|
107
105
|
})
|
@@ -19,27 +19,23 @@ test('it renders preset icon', () => {
|
|
19
19
|
render(
|
20
20
|
<StatChange
|
21
21
|
change="increase"
|
22
|
-
id="preset-icon"
|
23
22
|
value="28.4"
|
24
23
|
/>
|
25
24
|
)
|
26
25
|
|
27
|
-
const kit =
|
28
|
-
|
29
|
-
expect(icon).toBeInTheDocument()
|
26
|
+
const kit = screen.getByLabelText('arrow-up icon')
|
27
|
+
expect(kit).toBeTruthy
|
30
28
|
})
|
31
29
|
|
32
30
|
test('it renders custom icon', () => {
|
33
31
|
render(
|
34
32
|
<StatChange
|
35
33
|
icon="chart-line-down"
|
36
|
-
id="custom-icon"
|
37
34
|
value={6.1}
|
38
35
|
/>
|
39
36
|
|
40
37
|
)
|
41
38
|
|
42
|
-
const kit =
|
43
|
-
|
44
|
-
expect(icon).toBeInTheDocument()
|
39
|
+
const kit = screen.getByLabelText('chart-line-down icon')
|
40
|
+
expect(kit).toBeTruthy
|
45
41
|
})
|
@@ -1 +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 `
|
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).
|
@@ -37,8 +37,6 @@ examples:
|
|
37
37
|
- table_with_collapsible_with_nested_table_rails: Table with Collapsible with Nested Table
|
38
38
|
- table_with_clickable_rows: Table with Clickable Rows
|
39
39
|
- table_with_selectable_rows: Table with Selectable Rows
|
40
|
-
- table_with_header_style_borderless: Header Style Borderless
|
41
|
-
- table_with_header_style_floating: Header Style Floating
|
42
40
|
|
43
41
|
react:
|
44
42
|
- table_sm: Small
|
@@ -6,20 +6,8 @@
|
|
6
6
|
&.table-lg {
|
7
7
|
thead, .pb_table_thead {
|
8
8
|
tr, .pb_table_tr {
|
9
|
-
th:not(:has(
|
10
|
-
[class*="pb_body_kit"],
|
11
|
-
[class*="pb_detail_kit"],
|
12
|
-
[class*="pb_title_kit"]
|
13
|
-
)),
|
14
|
-
.pb_table_th:not(:has(
|
15
|
-
[class*="pb_body_kit"],
|
16
|
-
[class*="pb_detail_kit"],
|
17
|
-
[class*="pb_title_kit"]
|
18
|
-
)) {
|
19
|
-
@include caption;
|
20
|
-
}
|
21
|
-
|
22
9
|
th, .pb_table_th {
|
10
|
+
@include caption;
|
23
11
|
border-bottom: 1px solid $border_light;
|
24
12
|
}
|
25
13
|
}
|
@@ -95,10 +83,10 @@
|
|
95
83
|
|
96
84
|
// flatten out corners for floating headerstyle variant to avoid small triangle of white/empty space
|
97
85
|
.header-floating > thead > tr:first-child > th:first-child,
|
98
|
-
.header-floating > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:first-child {
|
99
|
-
border-top-left-radius: 0 !important;
|
100
|
-
}
|
101
|
-
.header-floating > thead > tr:first-child > th:last-child,
|
102
|
-
.header-floating > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:last-child {
|
103
|
-
border-top-right-radius: 0 !important;
|
86
|
+
.header-floating > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:first-child {
|
87
|
+
border-top-left-radius: 0 !important;
|
88
|
+
}
|
89
|
+
.header-floating > thead > tr:first-child > th:last-child,
|
90
|
+
.header-floating > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:last-child {
|
91
|
+
border-top-right-radius: 0 !important;
|
104
92
|
}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
[class^=pb_table]
|
1
|
+
[class^=pb_table] {
|
2
2
|
&.striped {
|
3
3
|
tbody, .pb_table_tbody {
|
4
|
-
tr:nth-child(odd)
|
4
|
+
tr:nth-child(odd), .pb_table_tr:nth-child(odd) {
|
5
5
|
background-color: $bg_light;
|
6
6
|
}
|
7
7
|
}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
&.dark {
|
11
11
|
&.striped {
|
12
12
|
tbody, .pb_table_tbody {
|
13
|
-
tr:nth-child(odd)
|
13
|
+
tr:nth-child(odd), .pb_table_tr:nth-child(odd) {
|
14
14
|
background-color: $bg_dark;
|
15
15
|
}
|
16
16
|
}
|
@@ -37,16 +37,13 @@ module Playbook
|
|
37
37
|
prop :outer_padding, type: Playbook::Props::Enum,
|
38
38
|
values: ["none", "xxs", "xs", "sm", "md", "lg", "xl", nil],
|
39
39
|
default: nil
|
40
|
-
prop :header_style, type: Playbook::Props::Enum,
|
41
|
-
values: %w[default borderless floating],
|
42
|
-
default: "default"
|
43
40
|
|
44
41
|
def classname
|
45
42
|
generate_classname(
|
46
43
|
"pb_table", "table-#{size}", single_line_class, dark_class,
|
47
44
|
disable_hover_class, container_class, data_table_class, sticky_class, sticky_left_column_class,
|
48
45
|
sticky_right_column_class, collapse_class, vertical_border_class, striped_class, outer_padding_class,
|
49
|
-
"table-responsive-#{responsive}",
|
46
|
+
"table-responsive-#{responsive}", separator: " "
|
50
47
|
)
|
51
48
|
end
|
52
49
|
|
@@ -126,15 +123,6 @@ module Playbook
|
|
126
123
|
outer_padding.present? ? "outer_padding_#{space_css_name}#{outer_padding}" : nil
|
127
124
|
end
|
128
125
|
end
|
129
|
-
|
130
|
-
def header_style_class
|
131
|
-
case header_style
|
132
|
-
when "borderless"
|
133
|
-
"header-borderless"
|
134
|
-
when "floating"
|
135
|
-
"header-floating"
|
136
|
-
end
|
137
|
-
end
|
138
126
|
end
|
139
127
|
end
|
140
128
|
end
|
@@ -26,12 +26,9 @@ module Playbook
|
|
26
26
|
prop :tag, type: Playbook::Props::Enum,
|
27
27
|
values: %w[table div],
|
28
28
|
default: "table"
|
29
|
-
prop :header_style, type: Playbook::Props::Enum,
|
30
|
-
values: %w[default borderless floating],
|
31
|
-
default: "default"
|
32
29
|
|
33
30
|
def classname
|
34
|
-
generate_classname("pb_table_header_kit", align_class
|
31
|
+
generate_classname("pb_table_header_kit", align_class) + tag_class
|
35
32
|
end
|
36
33
|
|
37
34
|
def tag_class
|
@@ -109,15 +106,6 @@ module Playbook
|
|
109
106
|
end
|
110
107
|
active_item
|
111
108
|
end
|
112
|
-
|
113
|
-
def header_style_class
|
114
|
-
case header_style
|
115
|
-
when "borderless"
|
116
|
-
"header-borderless"
|
117
|
-
when "floating"
|
118
|
-
"header-floating"
|
119
|
-
end
|
120
|
-
end
|
121
109
|
end
|
122
110
|
end
|
123
111
|
end
|