playbook_ui 14.8.0.pre.alpha.PBNTR713dropdowncustomtriggerbug4696 → 14.8.0.pre.alpha.PLAY1598floatinguiupgrade4563
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/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
- data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +4 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +7 -84
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +1 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +4 -0
- data/app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx +2 -13
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +12 -63
- data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +1 -2
- data/app/pb_kits/playbook/pb_table/_table.tsx +24 -103
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -2
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -47
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -59
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -3
- data/app/pb_kits/playbook/pb_typeahead/index.ts +3 -29
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
- data/app/pb_kits/playbook/utilities/_max_width.scss +0 -4
- data/app/pb_kits/playbook/utilities/_min_width.scss +1 -1
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +0 -24
- data/dist/chunks/_typeahead-DUfnbpvK.js +22 -0
- data/dist/chunks/_weekday_stacked-CFiZk2PV.js +45 -0
- data/dist/chunks/{lib-SyD3buPZ.js → lib-BC6ESsxG.js} +1 -1
- data/dist/chunks/{pb_form_validation-Dt8UJgrJ.js → pb_form_validation-B_Z9rEbg.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/classnames.rb +0 -3
- data/lib/playbook/forms/builder/typeahead_field.rb +0 -13
- data/lib/playbook/kit_base.rb +1 -16
- data/lib/playbook/version.rb +1 -1
- metadata +6 -16
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +0 -87
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +0 -2
- data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +0 -4
- data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +0 -18
- data/app/pb_kits/playbook/tokens/_height.scss +0 -19
- data/app/pb_kits/playbook/tokens/exports/_height.module.scss +0 -37
- data/app/pb_kits/playbook/utilities/_height.scss +0 -33
- data/dist/chunks/_typeahead-C8Q_fFYF.js +0 -22
- data/dist/chunks/_weekday_stacked-CUJfwh5E.js +0 -45
- data/lib/playbook/height.rb +0 -29
- data/lib/playbook/max_height.rb +0 -29
- data/lib/playbook/min_height.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9353b3b402295905df0220cec1a5c043cdfaf017635cfb8e53887a581f1932ca
|
4
|
+
data.tar.gz: d68b282ac69c6ea7d57e48b7aaee56682c0247fff6ca297c54e1a8c70cf2a7d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d32c0d53ed43c2f064913f1a73499f8652bb1c13a388646721590fd9cd8c0f57893c912b9d0d1530e3bf28b779567a260e69a66046847186b1e4a4a9a6e0613f
|
7
|
+
data.tar.gz: 1432f779bd804e750f0cee0e9b4fe1adcf01ba489c9a1da7f3495684320cb8cdb2f7d2755316c69f4548404fc1106eea396d4c0a1e2835a3cab970816bb0e904
|
@@ -6,12 +6,12 @@
|
|
6
6
|
) do %>
|
7
7
|
<%= content.presence || object.input %>
|
8
8
|
<% if object.indeterminate %>
|
9
|
-
<span
|
9
|
+
<span class="pb_checkbox_indeterminate">
|
10
10
|
<%= pb_rails("icon", props: { icon: "minus", classname: "indeterminate_icon", fixed_width: true}) %>
|
11
11
|
<%= pb_rails("icon", props: { icon: "check", classname: "check_icon hidden", fixed_width: true}) %>
|
12
12
|
</span>
|
13
13
|
<% else %>
|
14
|
-
<span
|
14
|
+
<span class="pb_checkbox_checkmark">
|
15
15
|
<%= pb_rails("icon", props: { icon: "check", classname: "check_icon", fixed_width: true}) %>
|
16
16
|
<%= pb_rails("icon", props: { icon: "minus", classname: "indeterminate_icon hidden", fixed_width: true}) %>
|
17
17
|
</span>
|
@@ -18,6 +18,10 @@ module Playbook
|
|
18
18
|
prop :form_spacing, type: Playbook::Props::Boolean,
|
19
19
|
default: false
|
20
20
|
|
21
|
+
def checked_html
|
22
|
+
checked ? "checked='true'" : nil
|
23
|
+
end
|
24
|
+
|
21
25
|
def classname
|
22
26
|
generate_classname("pb_checkbox_kit", checked_class) + indeterminate_class + error_class
|
23
27
|
end
|
@@ -1,84 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<thead>
|
9
|
-
<tr>
|
10
|
-
<th>
|
11
|
-
<%= pb_rails("checkbox", props: {
|
12
|
-
checked: true,
|
13
|
-
text: "Uncheck All",
|
14
|
-
value: "checkbox-value",
|
15
|
-
name: "main-checkbox",
|
16
|
-
indeterminate: true,
|
17
|
-
id: "indeterminate-checkbox"
|
18
|
-
}) %>
|
19
|
-
</th>
|
20
|
-
</tr>
|
21
|
-
</thead>
|
22
|
-
|
23
|
-
<tbody>
|
24
|
-
<% checkboxes.each do |checkbox| %>
|
25
|
-
<tr>
|
26
|
-
<td>
|
27
|
-
<%= pb_rails("checkbox", props: {
|
28
|
-
checked: checkbox[:checked],
|
29
|
-
text: checkbox[:name],
|
30
|
-
value: checkbox[:id],
|
31
|
-
name: "#{checkbox[:id]}-indeterminate-checkbox",
|
32
|
-
id: "#{checkbox[:id]}-indeterminate-checkbox",
|
33
|
-
}) %>
|
34
|
-
</td>
|
35
|
-
</tr>
|
36
|
-
<% end %>
|
37
|
-
</tbody>
|
38
|
-
<% end %>
|
39
|
-
|
40
|
-
<script>
|
41
|
-
document.addEventListener('DOMContentLoaded', function() {
|
42
|
-
const mainCheckboxWrapper = document.getElementById('indeterminate-checkbox');
|
43
|
-
const mainCheckbox = document.getElementsByName("main-checkbox")[0];
|
44
|
-
const childCheckboxes = document.querySelectorAll('input[type="checkbox"][id$="indeterminate-checkbox"]');
|
45
|
-
|
46
|
-
const updateMainCheckbox = () => {
|
47
|
-
// Count the number of checked child checkboxes
|
48
|
-
const checkedCount = Array.from(childCheckboxes).filter(cb => cb.checked).length;
|
49
|
-
// Determine if the main checkbox should be in an indeterminate state
|
50
|
-
const indeterminate = checkedCount > 0 && checkedCount < childCheckboxes.length;
|
51
|
-
|
52
|
-
// Set the main checkbox states
|
53
|
-
mainCheckbox.indeterminate = indeterminate;
|
54
|
-
mainCheckbox.checked = checkedCount > 0;
|
55
|
-
|
56
|
-
// Determine the main checkbox label based on the number of checked checkboxes
|
57
|
-
const text = checkedCount === 0 ? 'Check All' : 'Uncheck All';
|
58
|
-
|
59
|
-
// Determine the icon class to add and remove based on the number of checked checkboxes
|
60
|
-
const iconClassToAdd = checkedCount === 0 ? 'pb_checkbox_checkmark' : 'pb_checkbox_indeterminate';
|
61
|
-
const iconClassToRemove = checkedCount === 0 ? 'pb_checkbox_indeterminate' : 'pb_checkbox_checkmark';
|
62
|
-
|
63
|
-
// Update main checkbox label
|
64
|
-
mainCheckboxWrapper.getElementsByClassName('pb_body_kit')[0].textContent = text;
|
65
|
-
|
66
|
-
// Add and remove the icon class to the main checkbox wrapper
|
67
|
-
mainCheckboxWrapper.querySelector('[data-pb-checkbox-icon-span]').classList.add(iconClassToAdd);
|
68
|
-
mainCheckboxWrapper.querySelector('[data-pb-checkbox-icon-span]').classList.remove(iconClassToRemove);
|
69
|
-
|
70
|
-
// Toggle the visibility of the checkbox icon based on the indeterminate state
|
71
|
-
mainCheckboxWrapper.getElementsByClassName("indeterminate_icon")[0].classList.toggle('hidden', !indeterminate);
|
72
|
-
mainCheckboxWrapper.getElementsByClassName("check_icon")[0].classList.toggle('hidden', indeterminate);
|
73
|
-
};
|
74
|
-
|
75
|
-
mainCheckbox.addEventListener('change', function() {
|
76
|
-
childCheckboxes.forEach(cb => cb.checked = this.checked);
|
77
|
-
updateMainCheckbox();
|
78
|
-
});
|
79
|
-
|
80
|
-
childCheckboxes.forEach(cb => {
|
81
|
-
cb.addEventListener('change', updateMainCheckbox);
|
82
|
-
});
|
83
|
-
});
|
84
|
-
</script>
|
1
|
+
<%= pb_rails("checkbox" , props: {
|
2
|
+
text: "Select ",
|
3
|
+
value: "checkbox-value",
|
4
|
+
name: "main",
|
5
|
+
indeterminate: true,
|
6
|
+
id: "test-indeterminate-js"
|
7
|
+
}) %>
|
@@ -18,19 +18,9 @@ export const separateChildComponents = (children: React.ReactChild[] | React.Rea
|
|
18
18
|
const otherChildren: React.ReactChild[] = [];
|
19
19
|
|
20
20
|
React.Children.forEach(children, (child) => {
|
21
|
-
|
22
|
-
const childType = element?.type;
|
23
|
-
const childDisplayName = (childType as any)?.displayName || (childType as any)?.name;
|
24
|
-
|
25
|
-
if (
|
26
|
-
childType === DropdownTrigger ||
|
27
|
-
childDisplayName === "DropdownTrigger"
|
28
|
-
) {
|
21
|
+
if (child && (child as ReactElement).type === DropdownTrigger) {
|
29
22
|
trigger = child;
|
30
|
-
} else if (
|
31
|
-
childType === DropdownContainer ||
|
32
|
-
childDisplayName === "DropdownContainer"
|
33
|
-
) {
|
23
|
+
} else if (child && (child as ReactElement).type === DropdownContainer) {
|
34
24
|
container = child;
|
35
25
|
} else {
|
36
26
|
otherChildren.push(child);
|
@@ -40,7 +30,6 @@ export const separateChildComponents = (children: React.ReactChild[] | React.Rea
|
|
40
30
|
return { trigger, container, otherChildren };
|
41
31
|
};
|
42
32
|
|
43
|
-
|
44
33
|
export const prepareSubcomponents = ({
|
45
34
|
children,
|
46
35
|
hasTriggerSubcomponent,
|
@@ -23,7 +23,7 @@
|
|
23
23
|
%>
|
24
24
|
|
25
25
|
<%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
|
26
|
-
<%= form.typeahead :
|
26
|
+
<%= form.typeahead :example_user, props: { data: { typeahead_example1: true, user: {} }, placeholder: "Search for a user" } %>
|
27
27
|
<%= form.text_field :example_text_field, props: { label: true } %>
|
28
28
|
<%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field" } %>
|
29
29
|
<%= form.email_field :example_email_field, props: { label: true } %>
|
@@ -92,7 +92,7 @@
|
|
92
92
|
const selectedUserData = JSON.parse(selectedUserJSON)
|
93
93
|
|
94
94
|
// set the input field's value
|
95
|
-
event.target.querySelector('input[name=
|
95
|
+
event.target.querySelector('input[name=example_user]').value = selectedUserData.login
|
96
96
|
|
97
97
|
// log the selected option's dataset
|
98
98
|
console.log('The selected user data:')
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= pb_form_with(scope: :example, url: "", method: :get, loading: true) do |form| %>
|
2
|
-
<%= form.text_field :
|
2
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
3
3
|
|
4
4
|
<%= form.actions do |action| %>
|
5
5
|
<%= action.submit %>
|
@@ -22,74 +22,23 @@
|
|
22
22
|
%>
|
23
23
|
|
24
24
|
<%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
|
25
|
-
<%= form.
|
26
|
-
<%= form.
|
27
|
-
<%= form.
|
28
|
-
<%= form.
|
29
|
-
<%= form.
|
30
|
-
<%= form.
|
31
|
-
<%= form.
|
32
|
-
<%= form.
|
33
|
-
<%= form.
|
34
|
-
<%= form.
|
35
|
-
<%= form.
|
36
|
-
<%= form.collection_select :example_collection_select_validation, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
|
25
|
+
<%= form.text_field :example_text_field, props: { label: true, required: true } %>
|
26
|
+
<%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field" } %>
|
27
|
+
<%= form.email_field :example_email_field, props: { label: true, required: true } %>
|
28
|
+
<%= form.number_field :example_number_field, props: { label: true, required: true } %>
|
29
|
+
<%= form.search_field :example_project_number, props: { label: true, required: true, validation: { pattern: "[0-9]{2}-[0-9]{5}", message: "Please enter a valid project number (example: 33-12345)." } } %>
|
30
|
+
<%= form.password_field :example_password_field, props: { label: true, required: true } %>
|
31
|
+
<%= form.url_field :example_url_field, props: { label: true, required: true } %>
|
32
|
+
<%= form.text_area :example_text_area, props: { label: true, required: true } %>
|
33
|
+
<%= form.dropdown_field :example_dropdown, props: { label: true, options: example_dropdown_options, required: true } %>
|
34
|
+
<%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true } %>
|
35
|
+
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
|
37
36
|
<%= form.check_box :example_checkbox, props: { text: "Example Checkbox", label: true, required: true } %>
|
38
37
|
<%= form.date_picker :example_date_picker_2, props: { label: true, required: true } %>
|
39
|
-
<%= form.star_rating_field :
|
38
|
+
<%= form.star_rating_field :example_star_rating, props: { variant: "interactive", label: true, required: true } %>
|
40
39
|
|
41
40
|
<%= form.actions do |action| %>
|
42
41
|
<%= action.submit %>
|
43
42
|
<%= action.button props: { type: "reset", text: "Cancel", variant: "secondary" } %>
|
44
43
|
<% end %>
|
45
44
|
<% end %>
|
46
|
-
|
47
|
-
<!-- form.typeahead user results example template -->
|
48
|
-
<template data-typeahead-example-result-option>
|
49
|
-
<%= pb_rails("user", props: {
|
50
|
-
name: tag(:slot, name: "name"),
|
51
|
-
orientation: "horizontal",
|
52
|
-
align: "left",
|
53
|
-
avatar_url: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApocMXEAAAAASUVORK5CYII=",
|
54
|
-
avatar: true
|
55
|
-
}) %>
|
56
|
-
</template>
|
57
|
-
|
58
|
-
<!-- form.typeahead JS example implementation -->
|
59
|
-
<%= javascript_tag defer: "defer" do %>
|
60
|
-
document.addEventListener("pb-typeahead-kit-search", function(event) {
|
61
|
-
if (!event.target.dataset || !event.target.dataset.typeaheadExample2) return
|
62
|
-
|
63
|
-
fetch(`https://api.github.com/search/users?q=${encodeURIComponent(event.detail.searchingFor)}`)
|
64
|
-
.then(response => response.json())
|
65
|
-
.then((result) => {
|
66
|
-
const resultOptionTemplate = document.querySelector("[data-typeahead-example-result-option]")
|
67
|
-
|
68
|
-
event.detail.setResults((result.items || []).map((user) => {
|
69
|
-
const wrapper = resultOptionTemplate.content.cloneNode(true)
|
70
|
-
wrapper.children[0].dataset.user = JSON.stringify(user)
|
71
|
-
wrapper.querySelector('slot[name="name"]').replaceWith(user.login)
|
72
|
-
wrapper.querySelector('img').dataset.src = user.avatar_url
|
73
|
-
return wrapper
|
74
|
-
}))
|
75
|
-
})
|
76
|
-
})
|
77
|
-
|
78
|
-
|
79
|
-
document.addEventListener("pb-typeahead-kit-result-option-selected", function(event) {
|
80
|
-
if (!event.target.dataset.typeaheadExample2) return
|
81
|
-
|
82
|
-
const selectedUserJSON = event.detail.selected.firstElementChild.dataset.user
|
83
|
-
const selectedUserData = JSON.parse(selectedUserJSON)
|
84
|
-
|
85
|
-
// set the input field's value
|
86
|
-
event.target.querySelector('input[name=example_typeahead_validation]').value = selectedUserData.login
|
87
|
-
|
88
|
-
// log the selected option's dataset
|
89
|
-
console.log('The selected user data:')
|
90
|
-
console.dir(selectedUserData)
|
91
|
-
|
92
|
-
// do even more with the data later - TBD
|
93
|
-
event.target.dataset.user = selectedUserJSON
|
94
|
-
})
|
95
|
-
<% end %>
|
@@ -4,11 +4,11 @@ import { buildAriaProps, buildDataProps, buildHtmlProps } from '../utilities/pro
|
|
4
4
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
5
5
|
import PbTable from '.'
|
6
6
|
import {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
TableHead,
|
8
|
+
TableHeader,
|
9
|
+
TableBody,
|
10
|
+
TableRow,
|
11
|
+
TableCell,
|
12
12
|
} from "./subcomponents";
|
13
13
|
|
14
14
|
type TableProps = {
|
@@ -28,7 +28,6 @@ type TableProps = {
|
|
28
28
|
singleLine?: boolean,
|
29
29
|
size?: "sm" | "md" | "lg",
|
30
30
|
sticky?: boolean,
|
31
|
-
stickyLeftcolumn?: string[],
|
32
31
|
striped?: boolean,
|
33
32
|
tag?: "table" | "div",
|
34
33
|
verticalBorder?: boolean,
|
@@ -52,7 +51,6 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
52
51
|
singleLine = false,
|
53
52
|
size = 'sm',
|
54
53
|
sticky = false,
|
55
|
-
stickyLeftcolumn = [],
|
56
54
|
striped = false,
|
57
55
|
tag = 'table',
|
58
56
|
verticalBorder = false,
|
@@ -78,7 +76,6 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
78
76
|
'single-line': singleLine,
|
79
77
|
'no-hover': disableHover,
|
80
78
|
'sticky-header': sticky,
|
81
|
-
'sticky-left-column': stickyLeftcolumn,
|
82
79
|
'striped': striped,
|
83
80
|
[outerPaddingCss]: outerPadding !== '',
|
84
81
|
},
|
@@ -88,56 +85,6 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
88
85
|
className
|
89
86
|
)
|
90
87
|
|
91
|
-
useEffect(() => {
|
92
|
-
const handleStickyColumns = () => {
|
93
|
-
let accumulatedWidth = 0;
|
94
|
-
|
95
|
-
stickyLeftcolumn.forEach((colId, index) => {
|
96
|
-
const isLastColumn = index === stickyLeftcolumn.length - 1;
|
97
|
-
const header = document.querySelector(`th[id="${colId}"]`);
|
98
|
-
const cells = document.querySelectorAll(`td[id="${colId}"]`);
|
99
|
-
|
100
|
-
if (header) {
|
101
|
-
header.classList.add('sticky');
|
102
|
-
(header as HTMLElement).style.left = `${accumulatedWidth}px`;
|
103
|
-
|
104
|
-
if (!isLastColumn) {
|
105
|
-
header.classList.add('with-border');
|
106
|
-
header.classList.remove('sticky-shadow');
|
107
|
-
} else {
|
108
|
-
header.classList.remove('with-border');
|
109
|
-
header.classList.add('sticky-shadow');
|
110
|
-
}
|
111
|
-
|
112
|
-
accumulatedWidth += (header as HTMLElement).offsetWidth;
|
113
|
-
}
|
114
|
-
|
115
|
-
cells.forEach((cell) => {
|
116
|
-
cell.classList.add('sticky');
|
117
|
-
(cell as HTMLElement).style.left = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
|
118
|
-
|
119
|
-
if (!isLastColumn) {
|
120
|
-
cell.classList.add('with-border');
|
121
|
-
cell.classList.remove('sticky-shadow');
|
122
|
-
} else {
|
123
|
-
cell.classList.remove('with-border');
|
124
|
-
cell.classList.add('sticky-shadow');
|
125
|
-
}
|
126
|
-
});
|
127
|
-
});
|
128
|
-
};
|
129
|
-
|
130
|
-
setTimeout(() => {
|
131
|
-
handleStickyColumns();
|
132
|
-
}, 10);
|
133
|
-
|
134
|
-
window.addEventListener('resize', handleStickyColumns);
|
135
|
-
|
136
|
-
return () => {
|
137
|
-
window.removeEventListener('resize', handleStickyColumns);
|
138
|
-
};
|
139
|
-
}, [stickyLeftcolumn]);
|
140
|
-
|
141
88
|
useEffect(() => {
|
142
89
|
const instance = new PbTable()
|
143
90
|
instance.connect()
|
@@ -145,52 +92,26 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
145
92
|
|
146
93
|
return (
|
147
94
|
<>
|
148
|
-
{
|
149
|
-
<
|
150
|
-
{
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
{children}
|
159
|
-
</table>
|
160
|
-
) : (
|
161
|
-
<div
|
162
|
-
{...ariaProps}
|
163
|
-
{...dataProps}
|
164
|
-
{...htmlProps}
|
165
|
-
className={classNames}
|
166
|
-
id={id}
|
167
|
-
>
|
168
|
-
{children}
|
169
|
-
</div>
|
170
|
-
)}
|
171
|
-
</div>
|
95
|
+
{isTableTag ? (
|
96
|
+
<table
|
97
|
+
{...ariaProps}
|
98
|
+
{...dataProps}
|
99
|
+
{...htmlProps}
|
100
|
+
className={classNames}
|
101
|
+
id={id}
|
102
|
+
>
|
103
|
+
{children}
|
104
|
+
</table>
|
172
105
|
) : (
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
</table>
|
183
|
-
) : (
|
184
|
-
<div
|
185
|
-
{...ariaProps}
|
186
|
-
{...dataProps}
|
187
|
-
{...htmlProps}
|
188
|
-
className={classNames}
|
189
|
-
id={id}
|
190
|
-
>
|
191
|
-
{children}
|
192
|
-
</div>
|
193
|
-
)
|
106
|
+
<div
|
107
|
+
{...ariaProps}
|
108
|
+
{...dataProps}
|
109
|
+
{...htmlProps}
|
110
|
+
className={classNames}
|
111
|
+
id={id}
|
112
|
+
>
|
113
|
+
{children}
|
114
|
+
</div>
|
194
115
|
)}
|
195
116
|
</>
|
196
117
|
)
|
@@ -25,4 +25,3 @@ export { default as TableDiv } from './_table_div.jsx'
|
|
25
25
|
export { default as TableWithSubcomponents } from './_table_with_subcomponents.jsx'
|
26
26
|
export { default as TableWithSubcomponentsAsDivs } from './_table_with_subcomponents_as_divs.jsx'
|
27
27
|
export { default as TableOuterPadding } from './_table_outer_padding.jsx'
|
28
|
-
export { default as TableStickyLeftColumns } from './_table_sticky_left_columns.jsx'
|
@@ -41,50 +41,3 @@
|
|
41
41
|
}) %>
|
42
42
|
<% end %>
|
43
43
|
<% end %>
|
44
|
-
|
45
|
-
<br /><br /><br />
|
46
|
-
|
47
|
-
<%= pb_rails("timeline", props: {orientation: "vertical", show_date: true}) do %>
|
48
|
-
<%= pb_rails("timeline/item") do |item| %>
|
49
|
-
|
50
|
-
<% item.label do %>
|
51
|
-
<%= pb_rails("timeline/label") do %>
|
52
|
-
<%= pb_rails("title", props: { text: "Any Kit", size: 4 }) %>
|
53
|
-
<% end %>
|
54
|
-
<% end %>
|
55
|
-
|
56
|
-
<% item.step do %>
|
57
|
-
<%= pb_rails("timeline/step", props: { icon: 'user', icon_color: 'royal' }) %>
|
58
|
-
<% end %>
|
59
|
-
|
60
|
-
<% item.detail do %>
|
61
|
-
<%= pb_rails("title_detail", props: {
|
62
|
-
title: "Jackson Heights",
|
63
|
-
detail: "37-27 74th Street"
|
64
|
-
}) %>
|
65
|
-
<% end %>
|
66
|
-
<% end %>
|
67
|
-
|
68
|
-
<%= pb_rails("timeline/item", props: {icon: "map-marker-alt", icon_color: "purple", date: Date.today+1, line_style: "dotted" }) do |item| %>
|
69
|
-
<%= pb_rails("title_detail", props: {
|
70
|
-
title: "Society Hill",
|
71
|
-
detail: "72 E St Astoria"
|
72
|
-
}) %>
|
73
|
-
<% end %>
|
74
|
-
|
75
|
-
<%= pb_rails("timeline/item") do |item| %>
|
76
|
-
|
77
|
-
<% item.step do %>
|
78
|
-
<%= pb_rails("timeline/step") do %>
|
79
|
-
<%= pb_rails("pill", props: { text: "3" , variant: "success" }) %>
|
80
|
-
<% end %>
|
81
|
-
<% end %>
|
82
|
-
|
83
|
-
<% item.detail do %>
|
84
|
-
<%= pb_rails("title_detail", props: {
|
85
|
-
title: "Greenpoint",
|
86
|
-
detail: "81 Gate St Brooklyn"
|
87
|
-
}) %>
|
88
|
-
<% end %>
|
89
|
-
<% end %>
|
90
|
-
<% end %>
|
@@ -62,65 +62,6 @@ const TimelineWithChildren = (props) => (
|
|
62
62
|
</Timeline.Detail>
|
63
63
|
</Timeline.Item>
|
64
64
|
</Timeline>
|
65
|
-
|
66
|
-
<br />
|
67
|
-
<br />
|
68
|
-
<br />
|
69
|
-
|
70
|
-
<Timeline orientation="vertical"
|
71
|
-
showDate
|
72
|
-
{...props}
|
73
|
-
>
|
74
|
-
<Timeline.Item lineStyle="solid"
|
75
|
-
{...props}
|
76
|
-
>
|
77
|
-
<Timeline.Label>
|
78
|
-
<Title size={4}
|
79
|
-
text='Any Kit'
|
80
|
-
/>
|
81
|
-
</Timeline.Label>
|
82
|
-
<Timeline.Step icon="user"
|
83
|
-
iconColor="royal"
|
84
|
-
/>
|
85
|
-
<Timeline.Detail>
|
86
|
-
<TitleDetail detail="37-27 74th Street"
|
87
|
-
title="Jackson Heights"
|
88
|
-
{...props}
|
89
|
-
/>
|
90
|
-
</Timeline.Detail>
|
91
|
-
</Timeline.Item>
|
92
|
-
|
93
|
-
<Timeline.Item lineStyle="dotted"
|
94
|
-
{...props}
|
95
|
-
>
|
96
|
-
<Timeline.Label date={new Date(new Date().setDate(new Date().getDate() + 1))} />
|
97
|
-
<Timeline.Step icon="map-marker-alt"
|
98
|
-
iconColor="purple"
|
99
|
-
/>
|
100
|
-
<Timeline.Detail>
|
101
|
-
<TitleDetail detail="72 E St Astoria"
|
102
|
-
title="Society Hill"
|
103
|
-
{...props}
|
104
|
-
/>
|
105
|
-
</Timeline.Detail>
|
106
|
-
</Timeline.Item>
|
107
|
-
|
108
|
-
<Timeline.Item lineStyle="solid"
|
109
|
-
{...props}
|
110
|
-
>
|
111
|
-
<Timeline.Step>
|
112
|
-
<Pill text="3"
|
113
|
-
variant="success"
|
114
|
-
/>
|
115
|
-
</Timeline.Step>
|
116
|
-
<Timeline.Detail>
|
117
|
-
<TitleDetail detail="81 Gate St Brooklyn"
|
118
|
-
title="Greenpoint"
|
119
|
-
{...props}
|
120
|
-
/>
|
121
|
-
</Timeline.Detail>
|
122
|
-
</Timeline.Item>
|
123
|
-
</Timeline>
|
124
65
|
</div>
|
125
66
|
)
|
126
67
|
|
@@ -2,7 +2,6 @@
|
|
2
2
|
@import "../tokens/border_radius";
|
3
3
|
@import "../tokens/spacing";
|
4
4
|
@import "../tokens/shadows";
|
5
|
-
@import "../tokens/positioning";
|
6
5
|
|
7
6
|
[class^=pb_typeahead_kit] {
|
8
7
|
.typeahead-kit-select__option {
|
@@ -100,7 +99,6 @@
|
|
100
99
|
.typeahead-kit-select__menu {
|
101
100
|
background-color: $bg_dark;
|
102
101
|
color: $white;
|
103
|
-
z-index: $z_1;
|
104
102
|
}
|
105
103
|
.typeahead-kit-select__option:hover {
|
106
104
|
background-color: $active_dark;
|
@@ -184,7 +182,6 @@
|
|
184
182
|
}
|
185
183
|
|
186
184
|
.typeahead-kit-select__menu {
|
187
|
-
z-index: $z_1;
|
188
185
|
.typeahead-kit-select__menu-list {
|
189
186
|
padding: 0;
|
190
187
|
}
|