playbook_ui 14.12.0.pre.alpha.play1790darkaudittable5802 → 14.12.0.pre.alpha.play1828updateviteversion5680
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +4 -3
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +13 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading_react.md → _advanced_table_loading.md} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +6 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -5
- data/app/pb_kits/playbook/pb_button/button.rb +1 -1
- 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_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/_tooltip.tsx +1 -3
- data/dist/chunks/{_typeahead-BIhRQo8Q.js → _typeahead-BWwaAo_0.js} +3 -3
- data/dist/chunks/_weekday_stacked-zyBCd1s8.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -6
- 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/pb_forms_helper.rb +4 -13
- data/lib/playbook/version.rb +1 -1
- metadata +6 -19
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +0 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +0 -3
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +0 -92
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -64
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
- 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/dist/chunks/_weekday_stacked-CttHBFW3.js +0 -45
- data/lib/playbook/pb_forms_global_props_helper.rb +0 -136
- /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: e0708bee60916091d57c1678ed6b615833ed231e72ff762047b7dad668d02ca5
|
4
|
+
data.tar.gz: 5f4db5dd49d665ad94e7a2193421bc52f3ab39b1fc6f55d7ae9d43f7b2b3c22c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffb141e99988ffe64cd0b05ba0205d17c81fc1057a5b13999043ae6d7b91922d2e036160fdddcc6f9209e3b518ec4bc86c2c0e015168244cc84b57d1de2fcc15
|
7
|
+
data.tar.gz: c4d6031cd717b67efb312c8a39192f2e17922526dd15d6aa766b4a3b34bc39b903b8b3142a71ef6a447977f48a86af25df3ab39405392e23792b48501614f2f2
|
@@ -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';
|
@@ -39,7 +39,7 @@ export const TableHeaderCell = ({
|
|
39
39
|
sortIcon,
|
40
40
|
table
|
41
41
|
}: TableHeaderCellProps) => {
|
42
|
-
const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar
|
42
|
+
const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar } =
|
43
43
|
useContext(AdvancedTableContext);
|
44
44
|
|
45
45
|
type justifyTypes = "none" | "center" | "start" | "end" | "between" | "around" | "evenly"
|
@@ -91,7 +91,7 @@ const isToggleExpansionEnabled =
|
|
91
91
|
|
92
92
|
let justifyHeader:justifyTypes;
|
93
93
|
|
94
|
-
if (header?.index === 0 && hasAnySubRows
|
94
|
+
if (header?.index === 0 && hasAnySubRows) {
|
95
95
|
justifyHeader = enableSorting ? "between" : "start";
|
96
96
|
} else {
|
97
97
|
justifyHeader = isLeafColumn ? "end" : "center";
|
@@ -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,10 +1,15 @@
|
|
1
1
|
<%= pb_content_tag do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
<%= pb_rails("table", props: { size: "sm", data_table: true, number_spacing:"tabular", responsive: "none", dark: dark }.merge(object.table_props)) do %>
|
3
|
+
<% if content.present? %>
|
4
|
+
<% content.presence %>
|
5
|
+
<% else %>
|
6
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: object.column_definitions,
|
7
|
+
enable_toggle_expansion: object.enable_toggle_expansion,
|
8
|
+
responsive: object.responsive }) %>
|
9
|
+
<%= pb_rails("advanced_table/table_body", props: { id: object.id,
|
10
|
+
table_data: object.table_data,
|
11
|
+
column_definitions: object.column_definitions,
|
12
|
+
responsive: object.responsive }) %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
10
15
|
<% end %>
|
@@ -10,8 +10,6 @@ module Playbook
|
|
10
10
|
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
11
11
|
values: %w[all header none],
|
12
12
|
default: "header"
|
13
|
-
prop :loading, type: Playbook::Props::Boolean,
|
14
|
-
default: false
|
15
13
|
prop :responsive, type: Playbook::Props::Enum,
|
16
14
|
values: %w[none scroll],
|
17
15
|
default: "scroll"
|
@@ -245,7 +245,7 @@ test("toggleExpansionAll button exists and toggles subrows open and closed", asy
|
|
245
245
|
})
|
246
246
|
|
247
247
|
|
248
|
-
test("loading state +
|
248
|
+
test("loading state + initialLoadingRowCount prop", () => {
|
249
249
|
render(
|
250
250
|
<AdvancedTable
|
251
251
|
columnDefinitions={columnDefinitions}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
|
1
|
+
the optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
|
2
2
|
|
3
|
-
By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `
|
3
|
+
By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowCount` prop can be used to pass in a number. __NOTE__: This is only for the first render of the table, subsequent loading skeleton row count logic is handled within the kit itself.
|
@@ -1,7 +1,6 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
3
|
- advanced_table_beta: Default (Required Props)
|
4
|
-
- advanced_table_loading: Loading State
|
5
4
|
- advanced_table_beta_subrow_headers: SubRow Headers
|
6
5
|
- advanced_table_collapsible_trail_rails: Collapsible Trail
|
7
6
|
- advanced_table_table_props: Table Props
|
@@ -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";
|
@@ -16,8 +16,6 @@ module Playbook
|
|
16
16
|
default: []
|
17
17
|
prop :collapsible_trail, type: Playbook::Props::Boolean,
|
18
18
|
default: true
|
19
|
-
prop :loading, type: Playbook::Props::Boolean,
|
20
|
-
default: false
|
21
19
|
prop :responsive, type: Playbook::Props::Enum,
|
22
20
|
values: %w[none scroll],
|
23
21
|
default: "scroll"
|
@@ -56,7 +54,7 @@ module Playbook
|
|
56
54
|
current_data_attributes = current_depth.zero? ? { row_depth: 0 } : table_data_attributes
|
57
55
|
|
58
56
|
# Additional class and data attributes needed for toggle logic
|
59
|
-
output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive
|
57
|
+
output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive })
|
60
58
|
|
61
59
|
if row[:children].present?
|
62
60
|
row[:children].each do |child_row|
|
@@ -6,15 +6,11 @@
|
|
6
6
|
<%= pb_rails("table/table_header", props: { id: header_id, colspan: cell[:colspan], classname: [object.th_classname(is_first_column: cell_index.zero?), ('last-header-cell' if cell[:is_last_in_group] && cell_index != 0)].compact.join(' '), sort_menu: cell[:accessor] ? cell[:sort_menu] : nil }) do %>
|
7
7
|
<%= pb_rails("flex", props: { align: "center", justify: cell_index.zero? ? "start" : row_index === header_rows.size - 1 ? "end" : "center", text_align: "end" }) do %>
|
8
8
|
<% if cell_index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") && row_index === header_rows.size - 1 %>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
onclick="expandAllRows(this); event.preventDefault();">
|
15
|
-
<%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
|
16
|
-
</button>
|
17
|
-
<% end %>
|
9
|
+
<button
|
10
|
+
class="gray-icon toggle-all-icon"
|
11
|
+
onclick="expandAllRows(this); event.preventDefault();">
|
12
|
+
<%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
|
13
|
+
</button>
|
18
14
|
<% end %>
|
19
15
|
<%= cell[:label] %>
|
20
16
|
<% end %>
|
@@ -8,8 +8,6 @@ module Playbook
|
|
8
8
|
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
9
9
|
values: %w[all header none],
|
10
10
|
default: "header"
|
11
|
-
prop :loading, type: Playbook::Props::Boolean,
|
12
|
-
default: false
|
13
11
|
prop :responsive, type: Playbook::Props::Enum,
|
14
12
|
values: %w[none scroll],
|
15
13
|
default: "scroll"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% object.column_definitions.each_with_index do |column, index| %>
|
3
3
|
<% next unless column[:accessor].present? %>
|
4
4
|
<%= pb_rails("table/table_cell", props: { classname:object.td_classname(column, index)}) do %>
|
5
|
-
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end"
|
5
|
+
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
|
6
6
|
<% if collapsible_trail && index.zero? %>
|
7
7
|
<% (1..depth).each do |i| %>
|
8
8
|
<% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
|
@@ -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 %>
|
@@ -13,8 +13,6 @@ module Playbook
|
|
13
13
|
default: true
|
14
14
|
prop :table_data_attributes, type: Playbook::Props::HashProp,
|
15
15
|
default: {}
|
16
|
-
prop :loading, type: Playbook::Props::Boolean,
|
17
|
-
default: false
|
18
16
|
prop :responsive, type: Playbook::Props::Enum,
|
19
17
|
values: %w[none scroll],
|
20
18
|
default: "scroll"
|
@@ -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
|
|
@@ -2,18 +2,16 @@ import PbEnhancedElement from '../pb_enhanced_element'
|
|
2
2
|
|
3
3
|
export default class PbFixedConfirmationToast extends PbEnhancedElement {
|
4
4
|
static get selector() {
|
5
|
-
return '
|
5
|
+
return '.remove_toast'
|
6
6
|
}
|
7
7
|
|
8
8
|
connect() {
|
9
9
|
this.self = this.element
|
10
10
|
this.autoCloseToast(this.self)
|
11
11
|
|
12
|
-
|
13
|
-
this.self
|
14
|
-
|
15
|
-
})
|
16
|
-
}
|
12
|
+
this.self.addEventListener('click', () => {
|
13
|
+
this.removeToast(this.self)
|
14
|
+
})
|
17
15
|
}
|
18
16
|
|
19
17
|
removeToast(elem) {
|
@@ -34,4 +32,4 @@ export default class PbFixedConfirmationToast extends PbEnhancedElement {
|
|
34
32
|
}, autoCloseIntValue)
|
35
33
|
}
|
36
34
|
}
|
37
|
-
}
|
35
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div, id: object.id, data: object.data, class: object.classname + object.size_class, tabindex: object.tabindex, **combined_html_options) do %>
|
2
2
|
<% if object.name.present? %>
|
3
3
|
<%= pb_rails("avatar", props: { name: object.name, image_url: object.avatar_url, size: "xxs" }) %>
|
4
4
|
<% if object.truncate %>
|
@@ -39,17 +39,20 @@
|
|
39
39
|
</tr>
|
40
40
|
</tbody>
|
41
41
|
<% end %>
|
42
|
+
|
42
43
|
<%= pb_rails("table", props: { size: "sm", margin_bottom: "lg" }) do %>
|
43
44
|
<colgroup>
|
44
45
|
<%= pb_rails("background", props: { background_color: "error_subtle", tag: "col" }) %>
|
45
|
-
<%= pb_rails("background", props: { background_color: "
|
46
|
+
<%= pb_rails("background", props: { background_color: "card_light", tag: "col" }) %>
|
46
47
|
<%= pb_rails("background", props: { background_color: "warning_subtle", tag: "col" }) %>
|
47
48
|
</colgroup>
|
48
|
-
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
<%= pb_rails("background", props: { background_color: "card_light", tag: "thead" }) do %>
|
50
|
+
<tr>
|
51
|
+
<th>Column 1</th>
|
52
|
+
<th>Column 2</th>
|
53
|
+
<th>Column 3</th>
|
54
|
+
</tr>
|
55
|
+
<% end %>
|
53
56
|
<tbody>
|
54
57
|
<tr>
|
55
58
|
<td>Value 1</td>
|
@@ -68,7 +68,7 @@ const TableWithBackgroundKit = (props) => {
|
|
68
68
|
tag='col'
|
69
69
|
/>
|
70
70
|
<Background
|
71
|
-
backgroundColor="
|
71
|
+
backgroundColor="card_light"
|
72
72
|
tag='col'
|
73
73
|
/>
|
74
74
|
<Background
|
@@ -76,13 +76,16 @@ const TableWithBackgroundKit = (props) => {
|
|
76
76
|
tag='col'
|
77
77
|
/>
|
78
78
|
</colgroup>
|
79
|
-
<
|
79
|
+
<Background
|
80
|
+
backgroundColor="card_light"
|
81
|
+
tag='thead'
|
82
|
+
>
|
80
83
|
<tr>
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
+
<th>{'Column 1'}</th>
|
85
|
+
<th>{'Column 2'}</th>
|
86
|
+
<th>{'Column 3'}</th>
|
84
87
|
</tr>
|
85
|
-
</
|
88
|
+
</Background>
|
86
89
|
<tbody>
|
87
90
|
<tr>
|
88
91
|
<td>{'Value 1'}</td>
|
@@ -74,31 +74,6 @@
|
|
74
74
|
&.table-card {
|
75
75
|
background: none !important;
|
76
76
|
|
77
|
-
&.dark {
|
78
|
-
tbody, .pb_table_tbody {
|
79
|
-
tr, .pb_table_tr {
|
80
|
-
td, .pb_table_td {
|
81
|
-
background: $bg_dark_card !important;
|
82
|
-
border-color: $border_dark !important;
|
83
|
-
&:before {
|
84
|
-
color: $text_dk_light !important;
|
85
|
-
}
|
86
|
-
&:after {
|
87
|
-
height: 0;
|
88
|
-
background-color: transparent;
|
89
|
-
}
|
90
|
-
|
91
|
-
&:first-child {
|
92
|
-
border-radius: $border_rad_light $border_rad_light 0 0 !important;
|
93
|
-
}
|
94
|
-
&:last-child {
|
95
|
-
border-radius: 0 0 $border_rad_light $border_rad_light !important;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
77
|
tbody, .pb_table_tbody {
|
103
78
|
tr, .pb_table_tr {
|
104
79
|
td, .pb_table_td {
|
@@ -106,7 +81,6 @@
|
|
106
81
|
border-left-width: 1px !important;
|
107
82
|
border-right-width: 1px !important;
|
108
83
|
border-top-width: 1px !important;
|
109
|
-
|
110
84
|
&:after {
|
111
85
|
height: 0;
|
112
86
|
background-color: transparent;
|
@@ -74,31 +74,6 @@
|
|
74
74
|
&.table-card {
|
75
75
|
background: none !important;
|
76
76
|
|
77
|
-
&.dark {
|
78
|
-
tbody, .pb_table_tbody {
|
79
|
-
tr, .pb_table_tr {
|
80
|
-
td, .pb_table_td {
|
81
|
-
background: $bg_dark_card !important;
|
82
|
-
border-color: $border_dark !important;
|
83
|
-
&:before {
|
84
|
-
color: $text_dk_light !important;
|
85
|
-
}
|
86
|
-
&:after {
|
87
|
-
height: 0;
|
88
|
-
background-color: transparent;
|
89
|
-
}
|
90
|
-
|
91
|
-
&:first-child {
|
92
|
-
border-radius: $border_rad_light $border_rad_light 0 0 !important;
|
93
|
-
}
|
94
|
-
&:last-child {
|
95
|
-
border-radius: 0 0 $border_rad_light $border_rad_light !important;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
77
|
tbody, .pb_table_tbody {
|
103
78
|
tr, .pb_table_tr {
|
104
79
|
td, .pb_table_td {
|