playbook_ui 14.12.0.pre.alpha.PBNTR8335906 → 14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751
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/Components/TableHeaderCell.tsx +3 -10
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +10 -9
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +21 -34
- data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -8
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -9
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
- data/app/pb_kits/playbook/pb_button/button.rb +1 -1
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +1 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +3 -3
- data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +5 -7
- data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
- data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +7 -6
- data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
- data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
- data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
- data/app/pb_kits/playbook/pb_link/link.rb +0 -6
- data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
- data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
- data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
- data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
- data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
- data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
- data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
- data/app/pb_kits/playbook/pb_user/user.rb +0 -1
- data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
- data/dist/chunks/{_typeahead-CkemExmL.js → _typeahead-BIhRQo8Q.js} +3 -3
- data/dist/chunks/_weekday_stacked-VKMYuo6-.js +45 -0
- data/dist/chunks/{lib-DjpLC8uO.js → lib-kMuhBuU7.js} +1 -1
- data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-DBJ0wZuS.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +2 -2
- 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 +7 -20
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +0 -26
- data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
- data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
- data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
- data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
- data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
- data/dist/chunks/_weekday_stacked-CtSzPEH0.js +0 -45
- /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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e10c1e4e4545b2a4d2d9efad06fb1a7313d20f051aebbe16ea6ae9938a51b05d
|
4
|
+
data.tar.gz: bb6f95cda4e9045dd17ba5832ff0754831bbfdfb40e7d2446b6900da742ea8ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cecb8ddd5a22de23262c27e2d5dd8e58c7b11c182504dd3e47fc5d1a0fdaff32de45ad9c254ecddd772674dea34aec612a5ab286992f257c82b7fc8d96af70e1
|
7
|
+
data.tar.gz: 6ceb08be13792f050c55662c2554f7afd3f5d2abcee774130c9361607337e9a585e88f75a606de1c5c5af8ce2bbaa0bf36d48f6ddbfbf310e542469d489b66e3
|
@@ -39,15 +39,8 @@ export const TableHeaderCell = ({
|
|
39
39
|
sortIcon,
|
40
40
|
table
|
41
41
|
}: TableHeaderCellProps) => {
|
42
|
-
const {
|
43
|
-
|
44
|
-
responsive,
|
45
|
-
selectableRows,
|
46
|
-
hasAnySubRows,
|
47
|
-
showActionsBar,
|
48
|
-
inlineRowLoading,
|
49
|
-
isActionBarVisible,
|
50
|
-
} = useContext(AdvancedTableContext);
|
42
|
+
const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar, inlineRowLoading } =
|
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 &&
|
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 },
|
@@ -31,12 +31,12 @@
|
|
31
31
|
width: 100%;
|
32
32
|
}
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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,6 +89,7 @@
|
|
89
89
|
}
|
90
90
|
}
|
91
91
|
|
92
|
+
|
92
93
|
.table-header-cells-active:first-child {
|
93
94
|
color: $primary !important;
|
94
95
|
}
|
@@ -178,7 +179,7 @@
|
|
178
179
|
}
|
179
180
|
|
180
181
|
// Responsive Styles
|
181
|
-
@media only screen and (max-width: $screen-xl-min) {
|
182
|
+
@media only screen and (max-width: $screen-xl-min) {
|
182
183
|
&[class*="advanced-table-responsive-scroll"] {
|
183
184
|
border-radius: 4px;
|
184
185
|
box-shadow: 1px 0 0 0px $border_light,
|
@@ -214,7 +215,7 @@
|
|
214
215
|
.bg-white td:first-child {
|
215
216
|
background-color: $white;
|
216
217
|
}
|
217
|
-
|
218
|
+
|
218
219
|
}
|
219
220
|
}
|
220
221
|
@media only screen and (min-width: $screen-xl-min) {
|
@@ -305,4 +306,4 @@
|
|
305
306
|
}
|
306
307
|
}
|
307
308
|
}
|
308
|
-
}
|
309
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useState, useEffect, useCallback
|
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"
|
@@ -296,20 +295,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
296
295
|
const onPageChange = (page: number) => {
|
297
296
|
table.setPageIndex(page - 1)
|
298
297
|
}
|
299
|
-
//When to show the actions bar as a whole
|
300
|
-
const isActionBarVisible = selectableRows && showActionsBar && selectedRowsLength > 0
|
301
|
-
|
302
|
-
//Ref and useEffect for animating the actions bar
|
303
|
-
const cardRef = useRef(null);
|
304
|
-
useEffect(() => {
|
305
|
-
if (cardRef.current) {
|
306
|
-
if (isActionBarVisible) {
|
307
|
-
showActionBar(cardRef.current);
|
308
|
-
} else {
|
309
|
-
hideActionBar(cardRef.current);
|
310
|
-
}
|
311
|
-
}
|
312
|
-
}, [isActionBarVisible]);
|
313
298
|
|
314
299
|
return (
|
315
300
|
<div {...ariaProps}
|
@@ -326,7 +311,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
326
311
|
expandedControl,
|
327
312
|
handleExpandOrCollapse,
|
328
313
|
inlineRowLoading,
|
329
|
-
isActionBarVisible,
|
330
314
|
loading,
|
331
315
|
responsive,
|
332
316
|
setExpanded,
|
@@ -349,24 +333,27 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
349
333
|
total={table.getPageCount()}
|
350
334
|
/>
|
351
335
|
}
|
352
|
-
|
353
|
-
|
354
|
-
className=
|
355
|
-
|
356
|
-
padding={`${isActionBarVisible ? "xs" : "none"}`}
|
357
|
-
>
|
358
|
-
<Flex alignItems="center"
|
359
|
-
justify="between"
|
360
|
-
>
|
361
|
-
<Caption color="light"
|
362
|
-
paddingLeft="xs"
|
363
|
-
size="xs"
|
336
|
+
{
|
337
|
+
selectableRows && showActionsBar && (
|
338
|
+
<Card className="row-selection-actions-card"
|
339
|
+
padding="xs"
|
364
340
|
>
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
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
|
+
}
|
370
357
|
<Table
|
371
358
|
className={`${loading ? "content-loading" : ""}`}
|
372
359
|
dark={dark}
|
@@ -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
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
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
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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: {
|
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",
|
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: {
|
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: {
|
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",
|
19
|
-
<%= pb_rails("badge", props: {
|
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 = (
|
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
|
-
|
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 = (
|
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
|
-
|
57
|
-
/>
|
53
|
+
/>
|
58
54
|
</div>
|
59
55
|
)
|
60
56
|
}
|
@@ -14,7 +14,6 @@ type PbDateProps = {
|
|
14
14
|
alignment?: "left" | "center" | "right";
|
15
15
|
aria?: { [key: string]: string };
|
16
16
|
className?: string;
|
17
|
-
dark?: boolean;
|
18
17
|
data?: { [key: string]: string };
|
19
18
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
20
19
|
id?: string;
|
@@ -30,7 +29,6 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
30
29
|
aria = {},
|
31
30
|
alignment = "left",
|
32
31
|
className,
|
33
|
-
dark = false,
|
34
32
|
data = {},
|
35
33
|
htmlOptions = {},
|
36
34
|
id,
|
@@ -58,7 +56,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
58
56
|
);
|
59
57
|
|
60
58
|
return (
|
61
|
-
<div
|
59
|
+
<div
|
62
60
|
{...ariaProps}
|
63
61
|
{...dataProps}
|
64
62
|
{...htmlProps}
|
@@ -95,9 +93,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
95
93
|
</>
|
96
94
|
: size == "md" || size == "lg"
|
97
95
|
? (
|
98
|
-
<Title
|
99
|
-
dark={dark}
|
100
|
-
size={4}
|
96
|
+
<Title size={4}
|
101
97
|
tag="h4"
|
102
98
|
>
|
103
99
|
{showIcon && (
|
@@ -131,7 +127,6 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
131
127
|
<>
|
132
128
|
{showIcon && (
|
133
129
|
<Caption className="pb_icon_kit_container"
|
134
|
-
dark={dark}
|
135
130
|
tag="span"
|
136
131
|
>
|
137
132
|
<Icon fixedWidth
|
@@ -143,20 +138,15 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
143
138
|
|
144
139
|
{showDayOfWeek && (
|
145
140
|
<>
|
146
|
-
<Caption
|
147
|
-
tag="div">
|
148
|
-
{weekday}
|
149
|
-
</Caption>
|
141
|
+
<Caption tag="div">{weekday}</Caption>
|
150
142
|
<Caption color="light"
|
151
|
-
dark={dark}
|
152
143
|
tag="div"
|
153
144
|
text=" • "
|
154
145
|
/>
|
155
146
|
</>
|
156
147
|
)}
|
157
148
|
|
158
|
-
<Caption
|
159
|
-
tag="span">
|
149
|
+
<Caption tag="span">
|
160
150
|
{month} {day}
|
161
151
|
{currentYear != year && <>{`, ${year}`}</>}
|
162
152
|
</Caption>
|
@@ -18,7 +18,7 @@ const DateDefault = (props) => {
|
|
18
18
|
value={"2012-08-03"}
|
19
19
|
{...props}
|
20
20
|
/>
|
21
|
-
<Caption
|
21
|
+
<Caption>{"(Hyphenated Date)"}</Caption>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<br />
|
@@ -56,7 +56,6 @@ const DateDefault = (props) => {
|
|
56
56
|
<Title
|
57
57
|
size={4}
|
58
58
|
text={"(Hyphenated Date)"}
|
59
|
-
{...props}
|
60
59
|
/>
|
61
60
|
</div>
|
62
61
|
|
@@ -4,8 +4,7 @@ import { Caption, Date as FormattedDate, Title } from 'playbook-ui'
|
|
4
4
|
const DateUnstyled = (props) => {
|
5
5
|
return (
|
6
6
|
<>
|
7
|
-
<Caption
|
8
|
-
size="xs"
|
7
|
+
<Caption size="xs"
|
9
8
|
text="Basic unstyled example"
|
10
9
|
/>
|
11
10
|
<FormattedDate
|
@@ -16,14 +15,10 @@ const DateUnstyled = (props) => {
|
|
16
15
|
|
17
16
|
<br />
|
18
17
|
|
19
|
-
<Caption
|
20
|
-
|
21
|
-
size="xs"
|
18
|
+
<Caption size="xs"
|
22
19
|
text="Example with wrapping typography kit"
|
23
20
|
/>
|
24
|
-
<Title {
|
25
|
-
size={1}
|
26
|
-
>
|
21
|
+
<Title size={1}>
|
27
22
|
<FormattedDate
|
28
23
|
unstyled
|
29
24
|
value={new Date('25 Dec 1995')}
|
@@ -33,13 +28,10 @@ const DateUnstyled = (props) => {
|
|
33
28
|
|
34
29
|
<br />
|
35
30
|
|
36
|
-
<Caption
|
37
|
-
size="xs"
|
31
|
+
<Caption size="xs"
|
38
32
|
text="Example with icon + subcaption"
|
39
33
|
/>
|
40
|
-
<Caption
|
41
|
-
size="xs"
|
42
|
-
>
|
34
|
+
<Caption size="xs">
|
43
35
|
<FormattedDate
|
44
36
|
showDayOfWeek
|
45
37
|
showIcon
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag("div",
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("form_group", props: {cursor: "pointer", full_width: object.full_width}) do %>
|
3
8
|
<label
|
4
9
|
for="upload-<%= object.id %>"
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<%= object.wrapper do %>
|
3
7
|
<%= pb_rails("flex", props: { orientation: "row", padding_right: "lg", vertical: "center" }) do %>
|
4
8
|
<% if (object.template != "sort_only") %>
|
@@ -5,7 +5,6 @@ examples:
|
|
5
5
|
- fixed_confirmation_toast_multi_line: Multi Line
|
6
6
|
- fixed_confirmation_toast_close: Click to Close
|
7
7
|
- fixed_confirmation_toast_positions: Click to Show Positions
|
8
|
-
- fixed_confirmation_toast_auto_close: Click to Show Auto Close
|
9
8
|
- fixed_confirmation_toast_children: Children
|
10
9
|
- fixed_confirmation_toast_custom_icon: Custom Icon
|
11
10
|
|