playbook_ui_docs 13.7.0 → 13.8.0.pre.alpha.PLAY962SingleSelect1246
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_currency/docs/_currency_unstyled.html.erb +14 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_unstyled.jsx +30 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_unstyled.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +2 -1
- data/app/pb_kits/playbook/pb_currency/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_currency/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.html.erb +6 -7
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.jsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.html.erb +73 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.jsx +87 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +2 -1
- data/dist/playbook-doc.js +8 -8
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1acb7ce313924a1d7d57cbc58d15c3deb04d3cb9f8d75b8d5ad350e48e044c95
|
4
|
+
data.tar.gz: 65a290662ce8754ca04c75cda97d524e6411c2fa06b47ba1317eefa7fffbfb8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec3ae2ea627933ae3c687e7fcc5862e82238bb5e1b4fb455ff49da49be07cefb23964020404f1e6c6cb2b81b3ab3ee824e18663d85f1178a6080a75367a99e9c
|
7
|
+
data.tar.gz: 143f6481b694d35df72d20ea6259e5a8cb6378e2824d38edd9dccc820fe3dd452650d41d3b444635f5aff727ad523374bf26102c5b434dc954c1da775c5c3fb9
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%= pb_rails("currency", props: {
|
2
|
+
amount: "2,000.50",
|
3
|
+
label: "Basic unstyled example",
|
4
|
+
margin_bottom: "md",
|
5
|
+
unstyled: true
|
6
|
+
}) %>
|
7
|
+
|
8
|
+
<%= pb_rails("title", props: { size: 1 }) do %>
|
9
|
+
<%= pb_rails("currency", props: {
|
10
|
+
amount: "2,000.50",
|
11
|
+
label: "Example with wrapping typography kit",
|
12
|
+
unstyled: true
|
13
|
+
}) %>
|
14
|
+
<% end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Currency, Title } from '../..'
|
3
|
+
|
4
|
+
const CurrencyUnstyled = (props) => {
|
5
|
+
return (
|
6
|
+
<>
|
7
|
+
<Currency
|
8
|
+
amount="2,000.50"
|
9
|
+
label="Basic unstyled example"
|
10
|
+
marginBottom="md"
|
11
|
+
unstyled
|
12
|
+
{...props}
|
13
|
+
/>
|
14
|
+
|
15
|
+
<Title
|
16
|
+
size={1}
|
17
|
+
{...props}
|
18
|
+
>
|
19
|
+
<Currency
|
20
|
+
amount="2,000.50"
|
21
|
+
label="Example with wrapping typography kit"
|
22
|
+
unstyled
|
23
|
+
{...props}
|
24
|
+
/>
|
25
|
+
</Title>
|
26
|
+
</>
|
27
|
+
)
|
28
|
+
}
|
29
|
+
|
30
|
+
export default CurrencyUnstyled
|
@@ -0,0 +1 @@
|
|
1
|
+
For alternative typography styles, you can pass a boolean prop called `unstyled` to the `Currency` kit and wrap it in any of our typography kits (`Title`, `Body`, `Caption`, etc.). This will allow the `Currency` kit to inherit any of our typography styles.
|
@@ -7,6 +7,7 @@ examples:
|
|
7
7
|
- currency_no_symbol: No Symbol
|
8
8
|
- currency_abbreviated: Abbreviate Larger Amounts
|
9
9
|
- currency_matching_decimals: Matching Decimals
|
10
|
+
- currency_unstyled: Unstyled
|
10
11
|
|
11
12
|
react:
|
12
13
|
- currency_variants: Variants
|
@@ -15,3 +16,4 @@ examples:
|
|
15
16
|
- currency_no_symbol: No Symbol
|
16
17
|
- currency_abbreviated: Abbreviate Larger Amounts
|
17
18
|
- currency_matching_decimals: Matching Decimals
|
19
|
+
- currency_unstyled: Unstyled
|
@@ -4,3 +4,4 @@ export { default as CurrencyAlignment } from './_currency_alignment.jsx'
|
|
4
4
|
export { default as CurrencyNoSymbol } from './_currency_no_symbol.jsx'
|
5
5
|
export { default as CurrencyAbbreviated } from './_currency_abbreviated.jsx'
|
6
6
|
export { default as CurrencyMatchingDecimals } from './_currency_matching_decimals.jsx'
|
7
|
+
export { default as CurrencyUnstyled } from './_currency_unstyled.jsx'
|
@@ -8,6 +8,7 @@
|
|
8
8
|
label: "People",
|
9
9
|
value: "People",
|
10
10
|
id: "101",
|
11
|
+
expanded: true,
|
11
12
|
children: [
|
12
13
|
{
|
13
14
|
label: "Talent Acquisition",
|
@@ -63,10 +64,8 @@
|
|
63
64
|
],
|
64
65
|
}] %>
|
65
66
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
tree_data: treeData
|
72
|
-
}) %>
|
67
|
+
<%= pb_rails("multi_level_select", props: {
|
68
|
+
id: "multi-level-select-default-rails",
|
69
|
+
name: "my_array",
|
70
|
+
tree_data: treeData
|
71
|
+
}) %>
|
@@ -77,7 +77,7 @@ const MultiLevelSelectSelectedIds = (props) => {
|
|
77
77
|
console.log("Selected Items with Return All Selected Data", selectedNodes)
|
78
78
|
}
|
79
79
|
returnAllSelected
|
80
|
-
selectedIds={["energy1","talent1"]}
|
80
|
+
selectedIds={["energy1", "talent1"]}
|
81
81
|
treeData={treeData}
|
82
82
|
{...props}
|
83
83
|
/>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<% treeData = [{
|
2
|
+
label: "Power Home Remodeling",
|
3
|
+
value: "Power Home Remodeling",
|
4
|
+
id: "200",
|
5
|
+
expanded: true,
|
6
|
+
children: [
|
7
|
+
{
|
8
|
+
label: "People",
|
9
|
+
value: "People",
|
10
|
+
id: "201",
|
11
|
+
expanded: true,
|
12
|
+
children: [
|
13
|
+
{
|
14
|
+
label: "Talent Acquisition",
|
15
|
+
value: "Talent Acquisition",
|
16
|
+
id: "202",
|
17
|
+
},
|
18
|
+
{
|
19
|
+
label: "Business Affairs",
|
20
|
+
value: "Business Affairs",
|
21
|
+
id: "203",
|
22
|
+
children: [
|
23
|
+
{
|
24
|
+
label: "Initiatives",
|
25
|
+
value: "Initiatives",
|
26
|
+
id: "204",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
label: "Learning & Development",
|
30
|
+
value: "Learning & Development",
|
31
|
+
id: "205",
|
32
|
+
},
|
33
|
+
],
|
34
|
+
},
|
35
|
+
{
|
36
|
+
label: "People Experience",
|
37
|
+
value: "People Experience",
|
38
|
+
id: "206",
|
39
|
+
},
|
40
|
+
],
|
41
|
+
},
|
42
|
+
{
|
43
|
+
label: "Contact Center",
|
44
|
+
value: "Contact Center",
|
45
|
+
id: "207",
|
46
|
+
children: [
|
47
|
+
{
|
48
|
+
label: "Appointment Management",
|
49
|
+
value: "Appointment Management",
|
50
|
+
id: "208",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
label: "Customer Service",
|
54
|
+
value: "Customer Service",
|
55
|
+
id: "209",
|
56
|
+
},
|
57
|
+
{
|
58
|
+
label: "Energy",
|
59
|
+
value: "Energy",
|
60
|
+
id: "210",
|
61
|
+
},
|
62
|
+
],
|
63
|
+
},
|
64
|
+
],
|
65
|
+
}] %>
|
66
|
+
|
67
|
+
<%= pb_rails("multi_level_select", props: {
|
68
|
+
id: "multi-level-select-single-rails",
|
69
|
+
name: "my_single_select_array",
|
70
|
+
tree_data: treeData,
|
71
|
+
input_name: "Power",
|
72
|
+
variant: "single"
|
73
|
+
}) %>
|
@@ -0,0 +1,87 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import MultiLevelSelect from "../_multi_level_select";
|
3
|
+
|
4
|
+
const treeData = [
|
5
|
+
{
|
6
|
+
label: "Power Home Remodeling",
|
7
|
+
value: "Power Home Remodeling",
|
8
|
+
id: "powerhome2",
|
9
|
+
expanded: true,
|
10
|
+
children: [
|
11
|
+
{
|
12
|
+
label: "People",
|
13
|
+
value: "People",
|
14
|
+
id: "people2",
|
15
|
+
expanded: true,
|
16
|
+
children: [
|
17
|
+
{
|
18
|
+
label: "Talent Acquisition",
|
19
|
+
value: "Talent Acquisition",
|
20
|
+
id: "talent2",
|
21
|
+
},
|
22
|
+
{
|
23
|
+
label: "Business Affairs",
|
24
|
+
value: "Business Affairs",
|
25
|
+
id: "business2",
|
26
|
+
children: [
|
27
|
+
{
|
28
|
+
label: "Initiatives",
|
29
|
+
value: "Initiatives",
|
30
|
+
id: "initiative2",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
label: "Learning & Development",
|
34
|
+
value: "Learning & Development",
|
35
|
+
id: "development2",
|
36
|
+
},
|
37
|
+
],
|
38
|
+
},
|
39
|
+
{
|
40
|
+
label: "People Experience",
|
41
|
+
value: "People Experience",
|
42
|
+
id: "experience2",
|
43
|
+
},
|
44
|
+
],
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: "Contact Center",
|
48
|
+
value: "Contact Center",
|
49
|
+
id: "contact2",
|
50
|
+
children: [
|
51
|
+
{
|
52
|
+
label: "Appointment Management",
|
53
|
+
value: "Appointment Management",
|
54
|
+
id: "appointment2",
|
55
|
+
},
|
56
|
+
{
|
57
|
+
label: "Customer Service",
|
58
|
+
value: "Customer Service",
|
59
|
+
id: "customer2",
|
60
|
+
},
|
61
|
+
{
|
62
|
+
label: "Energy",
|
63
|
+
value: "Energy",
|
64
|
+
id: "energy2",
|
65
|
+
},
|
66
|
+
],
|
67
|
+
},
|
68
|
+
],
|
69
|
+
},
|
70
|
+
];
|
71
|
+
|
72
|
+
const MultiLevelSelectSingle = (props) => {
|
73
|
+
return (
|
74
|
+
<div>
|
75
|
+
<MultiLevelSelect
|
76
|
+
id="multiselect-single"
|
77
|
+
inputName="Power"
|
78
|
+
onSelect={(selectedNode) => console.log("Selected Node", selectedNode)}
|
79
|
+
treeData={treeData}
|
80
|
+
variant="single"
|
81
|
+
{...props}
|
82
|
+
/>
|
83
|
+
</div>
|
84
|
+
)
|
85
|
+
};
|
86
|
+
|
87
|
+
export default MultiLevelSelectSingle;
|
@@ -1,12 +1,13 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
3
|
- multi_level_select_default: Default
|
4
|
+
- multi_level_select_single: Single Select
|
4
5
|
- multi_level_select_return_all_selected: Return All Selected
|
5
6
|
- multi_level_select_selected_ids: Selected Ids
|
6
7
|
- multi_level_select_with_form: With Form
|
7
|
-
|
8
|
+
|
8
9
|
react:
|
9
10
|
- multi_level_select_default: Default
|
11
|
+
- multi_level_select_single: Single Select
|
10
12
|
- multi_level_select_return_all_selected: Return All Selected
|
11
13
|
- multi_level_select_selected_ids: Selected Ids
|
12
|
-
|
@@ -1,3 +1,4 @@
|
|
1
1
|
export { default as MultiLevelSelectDefault } from './_multi_level_select_default.jsx'
|
2
|
+
export { default as MultiLevelSelectSingle } from './_multi_level_select_single.jsx'
|
2
3
|
export { default as MultiLevelSelectReturnAllSelected } from './_multi_level_select_return_all_selected.jsx'
|
3
|
-
export { default as MultiLevelSelectSelectedIds } from "./_multi_level_select_selected_ids.jsx"
|
4
|
+
export { default as MultiLevelSelectSelectedIds } from "./_multi_level_select_selected_ids.jsx"
|