playbook_ui_docs 14.18.0.pre.alpha.PLAY20397473 → 14.18.0.pre.alpha.PLAY20787400
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/docs/_advanced_table_beta.md +6 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows_react.jsx → _advanced_table_selectable_rows_no_subrows.jsx} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.jsx +1 -4
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +1 -4
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +1 -8
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_popover/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +2 -7
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +1 -9
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +1 -7
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +2 -6
- data/dist/playbook-doc.js +2 -2
- metadata +8 -20
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +0 -43
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +0 -55
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +0 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.html.erb +0 -41
- data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md +0 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +0 -52
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +0 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +0 -10
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +0 -20
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +0 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +0 -46
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md +0 -1
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_rails.html.erb → _advanced_table_selectable_rows.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows_rails.html.erb → _advanced_table_selectable_rows_no_subrows.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_react.md → _draggable_drop_zones.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_colors_react.md → _draggable_drop_zones_colors.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: b3e7d47a9299088d750906643acac266d30471dfea3e97e02d840a8cc7707f03
|
4
|
+
data.tar.gz: ebcc74afbe19ac073c894c1d73545ab932e36f9f10d850eec84431c20ec4fb24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caaa753b1c2df935c91ed8576f78af9c52f1f30dd64095ab88cb1447b69a576d6f1984ba2a98ce7563d2b095ead8a247b0f6fdbe51795d8f12b00b6fb4a1e7a5
|
7
|
+
data.tar.gz: b933dc82f82e408a2de8abe712cb3bb9b415db080126748c53cacbd31252394b8951104c77ea1e68ad2ce3c039eefa933bac40ef7ff7139558f338b7060e96d2
|
@@ -1,3 +1,9 @@
|
|
1
|
+
**BETA VERSION**
|
2
|
+
This kit's Rails version is currently under development. Some features may not work as expected, and breaking changes may still occur; use with caution.
|
3
|
+
<br />
|
4
|
+
<br />
|
5
|
+
<br />
|
6
|
+
|
1
7
|
The AdvancedTable kit accepts tree data and automatically renders expansion controls for nested subrows, to any depth, based on the data it is given. In it's simplest form, __the kit has two required props__:
|
2
8
|
|
3
9
|
### table_data
|
@@ -2,7 +2,7 @@ import React from "react"
|
|
2
2
|
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
3
3
|
import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
|
4
4
|
|
5
|
-
const
|
5
|
+
const AdvancedTableSelectableRowsNoSubrows = (props) => {
|
6
6
|
const columnDefinitions = [
|
7
7
|
{
|
8
8
|
accessor: "year",
|
@@ -49,4 +49,4 @@ const AdvancedTableSelectableRowsNoSubrowsReact = (props) => {
|
|
49
49
|
)
|
50
50
|
}
|
51
51
|
|
52
|
-
export default
|
52
|
+
export default AdvancedTableSelectableRowsNoSubrows
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md
CHANGED
@@ -1,5 +1 @@
|
|
1
|
-
`selectable_rows` can also be used with tables without nested row data. Set `enable_toggle_expansion: none` to adjust the Advanced Table styling to fit a table without subrows.
|
2
|
-
|
3
|
-
The data attribute `data-selected-rows` on the parent `pb_advanced_table` div will update dynamically with each selection to show an array of ids corresponding to the current selection.
|
4
|
-
|
5
|
-
__NOTE__: Each object within the `table_data` Array must contain a unique id in order to attach an id to all Rows for this to function.
|
1
|
+
`selectable_rows` can also be used with tables without nested row data. Set `enable_toggle_expansion: none` to adjust the Advanced Table styling to fit a table without subrows.
|
@@ -2,6 +2,5 @@
|
|
2
2
|
|
3
3
|
When a parent row is clicked, it will check all nested children rows, Children rows can be manually checked or unchecked as well.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
__NOTE__: Each object within the `table_data` Array must contain a unique id in order to attach an id to all Rows for this to function.
|
5
|
+
__ALERT TO DEVS__: UPDATE THIS PARAGRAPH IN THE FOLLOW UP STORY WHEN CHECKBOX FUNCTIONALITY IS SET PLEASE
|
6
|
+
The `onRowSelectionChange` prop returns an array of ids of all Rows that have been selected. Open the console on this example and check and uncheck checkboxes to see this is action! __NOTE__: Each object within the `tableData`Array must contain a unique id in order to attach an id to all Rows for this to function.
|
@@ -12,8 +12,8 @@ examples:
|
|
12
12
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
13
13
|
- advanced_table_column_headers: Multi-Header Columns
|
14
14
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
15
|
-
-
|
16
|
-
-
|
15
|
+
# - advanced_table_selectable_rows: Selectable Rows
|
16
|
+
# - advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
17
17
|
|
18
18
|
|
19
19
|
react:
|
@@ -41,7 +41,7 @@ examples:
|
|
41
41
|
- advanced_table_column_headers_custom_cell: Multi-Header Columns with Custom Cells
|
42
42
|
# - advanced_table_no_subrows: Table with No Subrows
|
43
43
|
- advanced_table_selectable_rows: Selectable Rows
|
44
|
-
-
|
44
|
+
- advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
45
45
|
- advanced_table_selectable_rows_actions: Selectable Rows (With Actions)
|
46
46
|
- advanced_table_selectable_rows_header: Selectable Rows (No Actions Bar)
|
47
47
|
- advanced_table_inline_editing: Inline Cell Editing
|
@@ -15,7 +15,7 @@ export { default as AdvancedTablePaginationWithProps } from './_advanced_table_p
|
|
15
15
|
export { default as AdvancedTableColumnHeaders } from './_advanced_table_column_headers.jsx'
|
16
16
|
export { default as AdvancedTableColumnHeadersMultiple } from './_advanced_table_column_headers_multiple.jsx'
|
17
17
|
export { default as AdvancedTableSelectableRows } from './_advanced_table_selectable_rows.jsx'
|
18
|
-
export { default as
|
18
|
+
export { default as AdvancedTableSelectableRowsNoSubrows } from './_advanced_table_selectable_rows_no_subrows.jsx'
|
19
19
|
export { default as AdvancedTableNoSubrows } from './_advanced_table_no_subrows.jsx'
|
20
20
|
export { default as AdvancedTableSelectableRowsHeader } from './_advanced_table_selectable_rows_header.jsx'
|
21
21
|
export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
|
@@ -1,14 +1,11 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
|
3
3
|
import DatePicker from '../_date_picker'
|
4
|
-
import Icon from '../../pb_icon/_icon'
|
5
4
|
|
6
5
|
const DatePickerError = (props) => (
|
7
6
|
<div>
|
8
7
|
<DatePicker
|
9
|
-
error=
|
10
|
-
<Icon icon="warning" /> Invalid date. Please pick a valid date.
|
11
|
-
</>}
|
8
|
+
error="Invalid date. Please pick a valid date."
|
12
9
|
pickerId="date-picker-error"
|
13
10
|
{...props}
|
14
11
|
/>
|
@@ -17,6 +17,5 @@ examples:
|
|
17
17
|
- draggable_with_cards: Draggable with Cards
|
18
18
|
- draggable_with_table: Draggable with Table
|
19
19
|
- draggable_multiple_containers: Dragging Across Multiple Containers
|
20
|
-
- draggable_drop_zones: Draggable Drop Zones
|
21
|
-
- draggable_drop_zones_colors: Draggable Drop Zones Colors
|
22
20
|
- draggable_event_listeners: Draggable Event Listeners
|
21
|
+
|
@@ -1,12 +1,9 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
2
|
import Dropdown from '../../pb_dropdown/_dropdown'
|
3
|
-
import Icon from '../../pb_icon/_icon'
|
4
3
|
|
5
4
|
const DropdownError = (props) => {
|
6
5
|
const [selectedOption, setSelectedOption] = useState()
|
7
|
-
const error = selectedOption?.value ? null :
|
8
|
-
<Icon icon="warning" /> Please make a valid selection
|
9
|
-
</>)
|
6
|
+
const error = selectedOption?.value ? null : "Please make a valid selection"
|
10
7
|
const options = [
|
11
8
|
{
|
12
9
|
label: "United States",
|
@@ -4,4 +4,3 @@ export { default as LineGraphLegendPosition } from './_line_graph_legend_positio
|
|
4
4
|
export { default as LineGraphLegendNonclickable } from './_line_graph_legend_nonclickable.jsx'
|
5
5
|
export { default as LineGraphHeight } from './_line_graph_height.jsx'
|
6
6
|
export { default as LineGraphColors } from './_line_graph_colors.jsx'
|
7
|
-
export { default as LineGraphPbStyles } from './_line_graph_pb_styles.jsx'
|
@@ -3,7 +3,6 @@ import React, { useEffect, useState } from "react";
|
|
3
3
|
import Button from '../../pb_button/_button'
|
4
4
|
import FixedConfirmationToast from '../../pb_fixed_confirmation_toast/_fixed_confirmation_toast'
|
5
5
|
import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
|
6
|
-
import Icon from '../../pb_icon/_icon'
|
7
6
|
|
8
7
|
const PhoneNumberInputValidation = (props) => {
|
9
8
|
const [formErrors, setFormErrors] = useState("");
|
@@ -30,12 +29,6 @@ const PhoneNumberInputValidation = (props) => {
|
|
30
29
|
setShowFormErrors(formErrors.length > 0);
|
31
30
|
}, [formErrors]);
|
32
31
|
|
33
|
-
const error = (
|
34
|
-
<>
|
35
|
-
<Icon icon="warning" /> Missing phone number.
|
36
|
-
</>
|
37
|
-
)
|
38
|
-
|
39
32
|
return (
|
40
33
|
<form
|
41
34
|
action=""
|
@@ -50,7 +43,7 @@ const PhoneNumberInputValidation = (props) => {
|
|
50
43
|
/>
|
51
44
|
)}
|
52
45
|
<PhoneNumberInput
|
53
|
-
error=
|
46
|
+
error="Missing phone number."
|
54
47
|
id="validation"
|
55
48
|
initialCountry={countryCode}
|
56
49
|
onChange={handleOnChange}
|
@@ -9,7 +9,6 @@ examples:
|
|
9
9
|
- phone_number_input_clear_field: Clearing the Input Field
|
10
10
|
- phone_number_input_access_input_element: Accessing the Input Element
|
11
11
|
- phone_number_input_format: Format as You Type
|
12
|
-
- phone_number_input_country_search: Country Search
|
13
12
|
|
14
13
|
rails:
|
15
14
|
- phone_number_input_default: Default
|
@@ -19,5 +18,4 @@ examples:
|
|
19
18
|
- phone_number_input_validation: Form Validation
|
20
19
|
- phone_number_input_format: Format as You Type
|
21
20
|
- phone_number_input_hidden_inputs: Hidden Inputs
|
22
|
-
- phone_number_input_country_search: Country Search
|
23
21
|
|
@@ -6,4 +6,3 @@ export { default as PhoneNumberInputValidation } from './_phone_number_input_val
|
|
6
6
|
export { default as PhoneNumberInputClearField } from './_phone_number_input_clear_field'
|
7
7
|
export { default as PhoneNumberInputAccessInputElement } from './_phone_number_input_access_input_element'
|
8
8
|
export { default as PhoneNumberInputFormat } from './_phone_number_input_format'
|
9
|
-
export { default as PhoneNumberInputCountrySearch } from './_phone_number_input_country_search'
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Body from '../../pb_body/_body'
|
3
3
|
import Select from '../../pb_select/_select'
|
4
|
-
import Icon from '../../pb_icon/_icon'
|
5
4
|
|
6
5
|
const SelectError = (props) => {
|
7
6
|
const options = [
|
@@ -19,14 +18,10 @@ const SelectError = (props) => {
|
|
19
18
|
},
|
20
19
|
]
|
21
20
|
|
22
|
-
const error = (<>
|
23
|
-
<Icon icon="warning" /> Please make a valid selection
|
24
|
-
</>)
|
25
|
-
|
26
21
|
return (
|
27
22
|
<div>
|
28
23
|
<Select
|
29
|
-
error=
|
24
|
+
error="Please make a valid selection"
|
30
25
|
label="Favorite Food"
|
31
26
|
name="food"
|
32
27
|
options={options}
|
@@ -34,7 +29,7 @@ const SelectError = (props) => {
|
|
34
29
|
{...props}
|
35
30
|
/>
|
36
31
|
<Body
|
37
|
-
error=
|
32
|
+
error="Please make a valid selection"
|
38
33
|
status="negative"
|
39
34
|
{...props}
|
40
35
|
/>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
2
|
|
3
3
|
import TextInput from '../_text_input'
|
4
|
-
import Icon from '../../pb_icon/_icon'
|
5
4
|
|
6
5
|
const TextInputError = (props) => {
|
7
6
|
const [email, setEmail] = useState('')
|
@@ -9,18 +8,11 @@ const TextInputError = (props) => {
|
|
9
8
|
const handleUpdateEmail = ({ target }) => {
|
10
9
|
setEmail(target.value)
|
11
10
|
}
|
12
|
-
|
13
|
-
const error = (
|
14
|
-
<>
|
15
|
-
<Icon icon="warning" /> Please enter a valid email address
|
16
|
-
</>
|
17
|
-
)
|
18
|
-
|
19
11
|
return (
|
20
12
|
<div>
|
21
13
|
<TextInput
|
22
14
|
addOn={{ icon: 'user', alignment: 'left', border: true }}
|
23
|
-
error=
|
15
|
+
error="Please enter a valid email address"
|
24
16
|
label="Email Address"
|
25
17
|
onChange={handleUpdateEmail}
|
26
18
|
placeholder="Enter email address"
|
@@ -1,21 +1,15 @@
|
|
1
1
|
import React, {useState} from 'react'
|
2
2
|
import Textarea from '../../pb_textarea/_textarea'
|
3
|
-
import Icon from '../../pb_icon/_icon'
|
4
3
|
|
5
4
|
const TextareaError = (props) => {
|
6
5
|
const [value, setValue] = useState('default value text')
|
7
6
|
const handleChange = (event) => {
|
8
7
|
setValue(event.target.value)
|
9
8
|
}
|
10
|
-
const error = (
|
11
|
-
<>
|
12
|
-
<Icon icon="warning" /> This field has an error!
|
13
|
-
</>
|
14
|
-
)
|
15
9
|
return (
|
16
10
|
<div>
|
17
11
|
<Textarea
|
18
|
-
error=
|
12
|
+
error="This field has an error!"
|
19
13
|
label="Label"
|
20
14
|
name="comment"
|
21
15
|
onChange={(e)=> handleChange(e)}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
2
2
|
|
3
3
|
import Typeahead from '../_typeahead'
|
4
|
-
import Icon from '../../pb_icon/_icon'
|
5
4
|
|
6
5
|
const options = [
|
7
6
|
{ label: 'Orange', value: '#FFA500' },
|
@@ -11,10 +10,7 @@ const options = [
|
|
11
10
|
]
|
12
11
|
|
13
12
|
const TypeaheadErrorState = (props) => {
|
14
|
-
const
|
15
|
-
<Icon icon="warning" /> Please make a valid selection
|
16
|
-
</>)
|
17
|
-
const [errorState, setErrorState] = useState(error);
|
13
|
+
const [errorState, setErrorState] = useState("Please make a valid selection");
|
18
14
|
const [searchValue, setSearchValue] = useState(null);
|
19
15
|
|
20
16
|
const handleOnChange = (value) => setSearchValue(value)
|
@@ -23,7 +19,7 @@ const TypeaheadErrorState = (props) => {
|
|
23
19
|
if(searchValue) {
|
24
20
|
setErrorState("")
|
25
21
|
} else {
|
26
|
-
setErrorState(
|
22
|
+
setErrorState("Please make a valid selection")
|
27
23
|
}
|
28
24
|
}, [searchValue])
|
29
25
|
|