playbook_ui_docs 12.37.0.pre.alpha.svgiconmethods1064 → 12.38.0.pre.alpha.PBNTR78selectkitmultipleprop1094
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_date/docs/_date_alignment.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +29 -5
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_variants.jsx +5 -5
- data/app/pb_kits/playbook/pb_icon/docs/_icon_animate.html.erb +0 -1
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.html.erb +0 -2
- data/app/pb_kits/playbook/pb_icon/docs/example.yml +9 -10
- data/app/pb_kits/playbook/pb_select/docs/_select_attributes.html.erb +26 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_attributes.md +1 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_multiple.html.erb +36 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_multiple.jsx +50 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_multiple.md +1 -0
- data/app/pb_kits/playbook/pb_select/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_select/docs/index.js +1 -0
- data/dist/playbook-doc.js +10 -15
- metadata +7 -3
- data/app/pb_kits/playbook/pb_icon/docs/_icon_svg.html.erb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f12c91c026a23ed3fa8df39512011d79eb4807bfb313e0e1db224123042589ea
|
4
|
+
data.tar.gz: 8ba1588e199adbb9de6e86683473fded972a444d66096caa43c4585bb30004a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 773c2337e6335e5c4798b1e01e40539e055acba614f074d9105c5a298f0a5c50e2e83aa3f20a2787d616c547cc85013409608d854e2ffeca51910d6cf6e29a49
|
7
|
+
data.tar.gz: 864e07f65b4ea5faa0ab48362381d1a14e1417c377c0b1b182c90056d300c54f30e49acae16a9f29413a294342cd47939ec6caac5b3df3c6f52b457a56c498c7
|
@@ -7,7 +7,7 @@ const DateAlignment = (props) => {
|
|
7
7
|
<FormattedDate
|
8
8
|
dayOfWeek
|
9
9
|
icon
|
10
|
-
value=
|
10
|
+
value={new Date('25 Dec 1995')}
|
11
11
|
{...props}
|
12
12
|
/>
|
13
13
|
|
@@ -17,7 +17,7 @@ const DateAlignment = (props) => {
|
|
17
17
|
alignment="center"
|
18
18
|
dayOfWeek
|
19
19
|
icon
|
20
|
-
value=
|
20
|
+
value={new Date('25 Dec 2020')}
|
21
21
|
{...props}
|
22
22
|
/>
|
23
23
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import { Date as FormattedDate } from '../../'
|
2
|
+
import { Date as FormattedDate, Caption, Title } from '../../'
|
3
3
|
|
4
4
|
const DateDefault = (props) => {
|
5
5
|
return (
|
@@ -12,9 +12,20 @@ const DateDefault = (props) => {
|
|
12
12
|
|
13
13
|
<br />
|
14
14
|
|
15
|
+
<div style={{display: "flex", columnGap: 4}}>
|
16
|
+
<FormattedDate
|
17
|
+
size="sm"
|
18
|
+
value={"2012-08-03"}
|
19
|
+
{...props}
|
20
|
+
/>
|
21
|
+
<Caption>{"(Hyphenated Date)"}</Caption>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<br />
|
25
|
+
|
15
26
|
<FormattedDate
|
16
27
|
size="sm"
|
17
|
-
value=
|
28
|
+
value={new Date('03 Aug 2012')}
|
18
29
|
{...props}
|
19
30
|
/>
|
20
31
|
|
@@ -23,7 +34,7 @@ const DateDefault = (props) => {
|
|
23
34
|
<FormattedDate
|
24
35
|
showDayOfWeek
|
25
36
|
size="sm"
|
26
|
-
value=
|
37
|
+
value={new Date('03 Dec 2017')}
|
27
38
|
{...props}
|
28
39
|
/>
|
29
40
|
|
@@ -37,8 +48,21 @@ const DateDefault = (props) => {
|
|
37
48
|
|
38
49
|
<br />
|
39
50
|
|
51
|
+
<div style={{display: "flex", columnGap: 4}}>
|
52
|
+
<FormattedDate
|
53
|
+
value={"2012-08-03"}
|
54
|
+
{...props}
|
55
|
+
/>
|
56
|
+
<Title
|
57
|
+
size={4}
|
58
|
+
text={"(Hyphenated Date)"}
|
59
|
+
/>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<br />
|
63
|
+
|
40
64
|
<FormattedDate
|
41
|
-
value=
|
65
|
+
value={new Date('03 Aug 2012')}
|
42
66
|
{...props}
|
43
67
|
/>
|
44
68
|
|
@@ -46,7 +70,7 @@ const DateDefault = (props) => {
|
|
46
70
|
|
47
71
|
<FormattedDate
|
48
72
|
showDayOfWeek
|
49
|
-
value=
|
73
|
+
value={new Date('03 Dec 2017')}
|
50
74
|
{...props}
|
51
75
|
/>
|
52
76
|
</>
|
@@ -21,7 +21,7 @@ const DateUnstyled = (props) => {
|
|
21
21
|
<Title size={1}>
|
22
22
|
<FormattedDate
|
23
23
|
unstyled
|
24
|
-
value=
|
24
|
+
value={new Date('25 Dec 1995')}
|
25
25
|
{...props}
|
26
26
|
/>
|
27
27
|
</Title>
|
@@ -36,7 +36,7 @@ const DateUnstyled = (props) => {
|
|
36
36
|
showDayOfWeek
|
37
37
|
showIcon
|
38
38
|
unstyled
|
39
|
-
value=
|
39
|
+
value={new Date('25 Dec 1995')}
|
40
40
|
{...props}
|
41
41
|
/>
|
42
42
|
</Caption>
|
@@ -7,7 +7,7 @@ const DateVariants = (props) => {
|
|
7
7
|
<FormattedDate
|
8
8
|
showIcon
|
9
9
|
size="sm"
|
10
|
-
value=
|
10
|
+
value={new Date('25 Dec 1995')}
|
11
11
|
{...props}
|
12
12
|
/>
|
13
13
|
|
@@ -15,7 +15,7 @@ const DateVariants = (props) => {
|
|
15
15
|
<br />
|
16
16
|
|
17
17
|
<FormattedDate
|
18
|
-
value=
|
18
|
+
value={new Date('25 Dec 1995')}
|
19
19
|
{...props}
|
20
20
|
/>
|
21
21
|
|
@@ -24,7 +24,7 @@ const DateVariants = (props) => {
|
|
24
24
|
|
25
25
|
<FormattedDate
|
26
26
|
showIcon
|
27
|
-
value=
|
27
|
+
value={new Date('25 Dec 1995')}
|
28
28
|
{...props}
|
29
29
|
/>
|
30
30
|
|
@@ -33,7 +33,7 @@ const DateVariants = (props) => {
|
|
33
33
|
|
34
34
|
<FormattedDate
|
35
35
|
showDayOfWeek
|
36
|
-
value=
|
36
|
+
value={new Date('25 Dec 1995')}
|
37
37
|
{...props}
|
38
38
|
/>
|
39
39
|
|
@@ -43,7 +43,7 @@ const DateVariants = (props) => {
|
|
43
43
|
<FormattedDate
|
44
44
|
showDayOfWeek
|
45
45
|
showIcon
|
46
|
-
value=
|
46
|
+
value={new Date('25 Dec 1995')}
|
47
47
|
{...props}
|
48
48
|
/>
|
49
49
|
</div>
|
@@ -1,15 +1,14 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
- icon_svg: Icon SVG
|
3
|
+
- icon_default: Icon Default
|
4
|
+
- icon_rotate: Icon Rotate
|
5
|
+
- icon_flip: Icon Flip
|
6
|
+
- icon_animate: Icon Animation
|
7
|
+
- icon_pull: Icon Pull
|
8
|
+
- icon_border: Icon Border
|
9
|
+
- icon_sizes: Icon Sizes
|
10
|
+
- icon_custom: Icon Custom
|
11
|
+
- icon_fa_kit: Icon with FontAwesome Kit
|
13
12
|
|
14
13
|
react:
|
15
14
|
- icon_default: Icon Default
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= pb_rails("select", props: {
|
2
|
+
attributes: {
|
3
|
+
data: { options: "data_attribute" },
|
4
|
+
},
|
5
|
+
label: "Favorite Food",
|
6
|
+
name: "food",
|
7
|
+
options: [
|
8
|
+
{
|
9
|
+
value: "1",
|
10
|
+
value_text: "Burgers",
|
11
|
+
},
|
12
|
+
{
|
13
|
+
value: "2",
|
14
|
+
selected: true,
|
15
|
+
value_text: "Pizza",
|
16
|
+
},
|
17
|
+
{
|
18
|
+
value: "3",
|
19
|
+
value_text: "Tacos",
|
20
|
+
},
|
21
|
+
{
|
22
|
+
value: "4",
|
23
|
+
value_text: "BBQ",
|
24
|
+
},
|
25
|
+
]
|
26
|
+
}) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Inspect the element and notice the data-attribute being added to the `<select>` element
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<%= pb_rails("select", props: {
|
2
|
+
label: "Favorite Food",
|
3
|
+
name: "food",
|
4
|
+
multiple: true,
|
5
|
+
options: [
|
6
|
+
{
|
7
|
+
value: "1",
|
8
|
+
value_text: "Burgers",
|
9
|
+
},
|
10
|
+
{
|
11
|
+
value: "2",
|
12
|
+
selected: true,
|
13
|
+
value_text: "Pizza",
|
14
|
+
},
|
15
|
+
{
|
16
|
+
value: "3",
|
17
|
+
value_text: "Tacos",
|
18
|
+
},
|
19
|
+
{
|
20
|
+
value: "4",
|
21
|
+
value_text: "BBQ",
|
22
|
+
},
|
23
|
+
{
|
24
|
+
value: "4",
|
25
|
+
value_text: "Sushi",
|
26
|
+
},
|
27
|
+
{
|
28
|
+
value: "4",
|
29
|
+
value_text: "Chinese",
|
30
|
+
},
|
31
|
+
{
|
32
|
+
value: "4",
|
33
|
+
value_text: "Hot Dogs",
|
34
|
+
},
|
35
|
+
]
|
36
|
+
}) %>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Select from '../_select'
|
4
|
+
|
5
|
+
const SelectMultiple = (props) => {
|
6
|
+
const options = [
|
7
|
+
{
|
8
|
+
value: '1',
|
9
|
+
text: 'Burgers',
|
10
|
+
},
|
11
|
+
{
|
12
|
+
value: '2',
|
13
|
+
text: 'Pizza',
|
14
|
+
},
|
15
|
+
{
|
16
|
+
value: '3',
|
17
|
+
text: 'Tacos',
|
18
|
+
},
|
19
|
+
{
|
20
|
+
value: '3',
|
21
|
+
text: 'BBQ',
|
22
|
+
},
|
23
|
+
{
|
24
|
+
value: '3',
|
25
|
+
text: 'Sushi',
|
26
|
+
},
|
27
|
+
{
|
28
|
+
value: '3',
|
29
|
+
text: 'Chinese',
|
30
|
+
},
|
31
|
+
{
|
32
|
+
value: '3',
|
33
|
+
text: 'Hot Dogs',
|
34
|
+
},
|
35
|
+
]
|
36
|
+
|
37
|
+
return (
|
38
|
+
<div>
|
39
|
+
<Select
|
40
|
+
label="Favorite Food"
|
41
|
+
multiple
|
42
|
+
name="food"
|
43
|
+
options={options}
|
44
|
+
{...props}
|
45
|
+
/>
|
46
|
+
</div>
|
47
|
+
)
|
48
|
+
}
|
49
|
+
|
50
|
+
export default SelectMultiple
|
@@ -0,0 +1 @@
|
|
1
|
+
We recommend using a typeahead for better UX
|
@@ -11,6 +11,8 @@ examples:
|
|
11
11
|
- select_error: Select w/ Error
|
12
12
|
- select_inline: Select Inline
|
13
13
|
- select_inline_compact: Select Inline Compact
|
14
|
+
- select_attributes: Select W/ Attributes
|
15
|
+
- select_multiple: Select Multiple
|
14
16
|
|
15
17
|
|
16
18
|
|
@@ -25,3 +27,4 @@ examples:
|
|
25
27
|
- select_error: Select w/ Error
|
26
28
|
- select_inline: Select Inline
|
27
29
|
- select_inline_compact: Select Inline Compact
|
30
|
+
- select_multiple: Select Multiple
|
@@ -8,3 +8,4 @@ export { default as SelectValueTextSame } from './_select_value_text_same.jsx'
|
|
8
8
|
export { default as SelectError } from './_select_error.jsx'
|
9
9
|
export { default as SelectInline } from './_select_inline.jsx'
|
10
10
|
export { default as SelectInlineCompact } from './_select_inline_compact.jsx'
|
11
|
+
export { default as SelectMultiple } from './_select_multiple.jsx'
|