playbook_ui_docs 12.36.0 → 12.37.0.pre.alpha.PLAY951collapsiblenav31062
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/pb_badge/docs/_badge_colors_swift.md +33 -0
- data/app/pb_kits/playbook/pb_badge/docs/_badge_default_swift.md +9 -0
- data/app/pb_kits/playbook/pb_badge/docs/_badge_notification_swift.md +9 -0
- data/app/pb_kits/playbook/pb_badge/docs/_badge_props_swift.md +6 -0
- data/app/pb_kits/playbook/pb_badge/docs/_badge_rounded_swift.md +9 -0
- data/app/pb_kits/playbook/pb_badge/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.jsx +2 -2
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.jsx +2 -2
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.jsx +11 -4
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.md +1 -1
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.jsx +5 -5
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_state.jsx +75 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_state.md +3 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +7 -6
- data/app/pb_kits/playbook/pb_collapsible/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +5 -4
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom.jsx +57 -0
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_emphasize.html.erb +23 -0
- data/app/pb_kits/playbook/pb_nav/docs/{_collapsible_nav_custom_icons.jsx → _collapsible_nav_emphasize.jsx} +9 -9
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_emphasize.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +5 -3
- data/app/pb_kits/playbook/pb_nav/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_pill/docs/_pill_default_swift.md +5 -0
- data/app/pb_kits/playbook/pb_pill/docs/_pill_props_swift.md +5 -0
- data/app/pb_kits/playbook/pb_pill/docs/_pill_variants_swift.md +10 -0
- data/app/pb_kits/playbook/pb_pill/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_alignment_swift.md +16 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_swift.md +18 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_default_swift.md +15 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_error_swift.md +14 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_orientation_swift.md +15 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_padding_swift.md +31 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_props_swift.md +10 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_spacing_swift.md +36 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_subtitle_swift.md +13 -0
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +11 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_options.html.erb +12 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align_swift.md +45 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default_swift.md +26 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_swift.md +25 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_props_swift.md +10 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_swift.md +67 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_swift.md +19 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +8 -0
- data/dist/playbook-doc.js +9 -9
- metadata +39 -8
@@ -0,0 +1,31 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
VStack(alignment: .leading) {
|
5
|
+
PBRadio(
|
6
|
+
items: [
|
7
|
+
PBRadioItem("Small")
|
8
|
+
],
|
9
|
+
orientation: .vertical,
|
10
|
+
padding: Spacing.small,
|
11
|
+
selected: $selectedPadding
|
12
|
+
)
|
13
|
+
PBRadio(
|
14
|
+
items: [
|
15
|
+
PBRadioItem("Medium")
|
16
|
+
],
|
17
|
+
orientation: .vertical,
|
18
|
+
padding: Spacing.medium,
|
19
|
+
selected: $selectedPadding
|
20
|
+
)
|
21
|
+
PBRadio(
|
22
|
+
items: [
|
23
|
+
PBRadioItem("Large")
|
24
|
+
],
|
25
|
+
orientation: .vertical,
|
26
|
+
padding: Spacing.large,
|
27
|
+
selected: $selectedPadding
|
28
|
+
)
|
29
|
+
}
|
30
|
+
|
31
|
+
```
|
@@ -0,0 +1,10 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **items** | `PBRadioItem` | Specifies the value of the Radio buttons | | |
|
5
|
+
| **orientation** | `Orientation` | Changes between stacked or inline Radio items | `.vertical` | |
|
6
|
+
| **textAlignment** | `Orientation` | Changes lable position | `.horizontal` | |
|
7
|
+
| **spacing** | `CGFloat` | Applies padding around Radio and lable | `Spacing.xSmall` | `Spacing.none` `Spacing.xxSmall` `Spacing.xSmall` `Spacing.small` `Spacing.medium` `Spacing.large` `Spacing.xLarge` |
|
8
|
+
| **padding** | `CGFloat` | Applies padding between Radio and lable | `Spacing.xSmall` | `Spacing.none` `Spacing.xxSmall` `Spacing.xSmall` `Spacing.small` `Spacing.medium` `Spacing.large` `Spacing.xLarge` |
|
9
|
+
| **errorState** | `Bool` | Changes Radio to error styling | | |
|
10
|
+
| **selected** | `PBRadioItem?` | Sets selected Radio item | | |
|
@@ -0,0 +1,36 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
HStack(alignment: .top) {
|
5
|
+
PBRadio(
|
6
|
+
items: [
|
7
|
+
PBRadioItem("Small"),
|
8
|
+
.init("Small Spacing"),
|
9
|
+
.init("Small Power")
|
10
|
+
],
|
11
|
+
orientation: .vertical,
|
12
|
+
spacing: Spacing.small,
|
13
|
+
selected: $selectedSpacing
|
14
|
+
)
|
15
|
+
PBRadio(
|
16
|
+
items: [
|
17
|
+
PBRadioItem("Medium"),
|
18
|
+
.init("Medium Spacing"),
|
19
|
+
.init("Medium Power")
|
20
|
+
],
|
21
|
+
orientation: .vertical,
|
22
|
+
spacing: Spacing.medium,
|
23
|
+
selected: $selectedSpacing
|
24
|
+
)
|
25
|
+
PBRadio(
|
26
|
+
items: [
|
27
|
+
PBRadioItem("Large"),
|
28
|
+
.init("Large Spacing"),
|
29
|
+
.init("Large Power")
|
30
|
+
],
|
31
|
+
orientation: .vertical,
|
32
|
+
spacing: Spacing.large,
|
33
|
+
selected: $selectedSpacing
|
34
|
+
)
|
35
|
+
}
|
36
|
+
```
|
@@ -0,0 +1,13 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
VStack(alignment: .leading) {
|
5
|
+
PBRadio(
|
6
|
+
items: [
|
7
|
+
PBRadioItem("Power", subtitle: "subtitle")
|
8
|
+
],
|
9
|
+
selected: $selectedSubtitle
|
10
|
+
)
|
11
|
+
}
|
12
|
+
|
13
|
+
```
|
@@ -12,3 +12,14 @@ examples:
|
|
12
12
|
- radio_custom: Custom
|
13
13
|
- radio_error: With Error
|
14
14
|
- radio_alignment: Alignment
|
15
|
+
|
16
|
+
swift:
|
17
|
+
- radio_default_swift: Default
|
18
|
+
- radio_custom_swift: Custom
|
19
|
+
- radio_error_swift: With Error
|
20
|
+
- radio_orientation_swift: Orientation
|
21
|
+
- radio_alignment_swift: Alignment
|
22
|
+
- radio_spacing_swift: Spacing
|
23
|
+
- radio_padding_swift: Padding
|
24
|
+
- radio_subtitle_swift: Subtitle
|
25
|
+
- radio_props_swift: ""
|
@@ -0,0 +1,45 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swiftå
|
4
|
+
VStack(alignment: .leading, spacing: Spacing.small) {
|
5
|
+
Group {
|
6
|
+
PBTimestamp(
|
7
|
+
Date(),
|
8
|
+
showDate: false
|
9
|
+
)
|
10
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
11
|
+
PBTimestamp(Date())
|
12
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
13
|
+
PBTimestamp(Date().addingTimeInterval(addThreeYear))
|
14
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
15
|
+
PBTimestamp(Date().addingTimeInterval(subOneYear))
|
16
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
17
|
+
}
|
18
|
+
Group {
|
19
|
+
PBTimestamp(
|
20
|
+
Date(),
|
21
|
+
showDate: false
|
22
|
+
)
|
23
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .center)
|
24
|
+
PBTimestamp(Date())
|
25
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .center)
|
26
|
+
PBTimestamp(Date().addingTimeInterval(addThreeYear))
|
27
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .center)
|
28
|
+
PBTimestamp(Date().addingTimeInterval(subOneYear))
|
29
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .center)
|
30
|
+
}
|
31
|
+
Group {
|
32
|
+
PBTimestamp(
|
33
|
+
Date(),
|
34
|
+
showDate: false
|
35
|
+
)
|
36
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .trailing)
|
37
|
+
PBTimestamp(Date())
|
38
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .trailing)
|
39
|
+
PBTimestamp(Date().addingTimeInterval(addThreeYear))
|
40
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .trailing)
|
41
|
+
PBTimestamp(Date().addingTimeInterval(subOneYear))
|
42
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .trailing)
|
43
|
+
}
|
44
|
+
}
|
45
|
+
```
|
@@ -0,0 +1,26 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
VStack(alignment: .leading, spacing: Spacing.small) {
|
5
|
+
PBTimestamp(
|
6
|
+
Date(),
|
7
|
+
showDate: false
|
8
|
+
)
|
9
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
10
|
+
|
11
|
+
PBTimestamp(
|
12
|
+
Date()
|
13
|
+
)
|
14
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
15
|
+
|
16
|
+
PBTimestamp(
|
17
|
+
Date().addingTimeInterval(addThreeYear)
|
18
|
+
)
|
19
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
20
|
+
|
21
|
+
PBTimestamp(
|
22
|
+
Date().addingTimeInterval(subOneYear)
|
23
|
+
)
|
24
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
25
|
+
}
|
26
|
+
```
|
@@ -0,0 +1,25 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
VStack(alignment: .leading, spacing: Spacing.small) {
|
5
|
+
PBTimestamp(
|
6
|
+
Date().addingTimeInterval(-10),
|
7
|
+
showUser: true,
|
8
|
+
text: "Maricris Nanota",
|
9
|
+
variant: .elapsed
|
10
|
+
)
|
11
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
12
|
+
|
13
|
+
PBTimestamp(
|
14
|
+
Date().addingTimeInterval(-36000),
|
15
|
+
variant: .elapsed
|
16
|
+
)
|
17
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
18
|
+
|
19
|
+
PBTimestamp(
|
20
|
+
Date().addingTimeInterval(-36000),
|
21
|
+
variant: .hideUserElapsed
|
22
|
+
)
|
23
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
24
|
+
}
|
25
|
+
```
|
@@ -0,0 +1,10 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **amPmStyle** | `AmPmStyle` | Displays shortened or full version of "am" and "pm" | `.short` | `.short` `.full` |
|
5
|
+
| **showDate** | `Bool` | Displays date | `true` | |
|
6
|
+
| **showTimeZone** | `Bool` | Displays time zone | `false` | |
|
7
|
+
| **showUser** | `Bool` | Displays user's name | `false` | |
|
8
|
+
| **text** | `String` | Specifies which user to display | `nil` | |
|
9
|
+
| **timeZone** | `String` | Specifies which time zone to display | `nil` | |
|
10
|
+
| **variant** | `Variant` | Specifies copy for last upadted | `.standard` | `.elapsed` `.standard` `.updated` `.hideUserElapsed` |
|
@@ -0,0 +1,67 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
VStack(alignment: .leading, spacing: Spacing.small) {
|
5
|
+
Group {
|
6
|
+
PBTimestamp(
|
7
|
+
Date(),
|
8
|
+
showDate: false,
|
9
|
+
showTimeZone: true,
|
10
|
+
timeZone: "America/New_York"
|
11
|
+
)
|
12
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
13
|
+
|
14
|
+
PBTimestamp(
|
15
|
+
Date(),
|
16
|
+
showTimeZone: true,
|
17
|
+
timeZone: "America/New_York"
|
18
|
+
)
|
19
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
20
|
+
|
21
|
+
PBTimestamp(
|
22
|
+
Date().addingTimeInterval(addThreeYear),
|
23
|
+
showTimeZone: true,
|
24
|
+
timeZone: "America/New_York"
|
25
|
+
)
|
26
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
27
|
+
|
28
|
+
PBTimestamp(
|
29
|
+
Date().addingTimeInterval(subOneYear),
|
30
|
+
showTimeZone: true,
|
31
|
+
timeZone: "America/New_York"
|
32
|
+
)
|
33
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
34
|
+
}
|
35
|
+
|
36
|
+
Group {
|
37
|
+
PBTimestamp(
|
38
|
+
Date(),
|
39
|
+
showDate: false,
|
40
|
+
showTimeZone: true,
|
41
|
+
timeZone: "Asia/Hong_Kong"
|
42
|
+
)
|
43
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
44
|
+
|
45
|
+
PBTimestamp(
|
46
|
+
Date(),
|
47
|
+
showTimeZone: true,
|
48
|
+
timeZone: "Asia/Hong_Kong"
|
49
|
+
)
|
50
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
51
|
+
|
52
|
+
PBTimestamp(
|
53
|
+
Date().addingTimeInterval(addThreeYear),
|
54
|
+
showTimeZone: true,
|
55
|
+
timeZone: "Asia/Hong_Kong"
|
56
|
+
)
|
57
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
58
|
+
|
59
|
+
PBTimestamp(
|
60
|
+
Date().addingTimeInterval(subOneYear),
|
61
|
+
showTimeZone: true,
|
62
|
+
timeZone: "Asia/Hong_Kong"
|
63
|
+
)
|
64
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
65
|
+
}
|
66
|
+
}
|
67
|
+
```
|
@@ -0,0 +1,19 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
VStack(alignment: .leading, spacing: Spacing.small) {
|
5
|
+
PBTimestamp(
|
6
|
+
Date().addingTimeInterval(-12),
|
7
|
+
showUser: true,
|
8
|
+
text: "Maricris Nanota",
|
9
|
+
variant: .updated
|
10
|
+
)
|
11
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
12
|
+
|
13
|
+
PBTimestamp(
|
14
|
+
Date().addingTimeInterval(-12),
|
15
|
+
variant: .updated
|
16
|
+
)
|
17
|
+
.frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
|
18
|
+
}
|
19
|
+
```
|
@@ -13,3 +13,11 @@ examples:
|
|
13
13
|
- timestamp_timezones: Timezones
|
14
14
|
- timestamp_updated: Last Updated by
|
15
15
|
- timestamp_elapsed: Time Ago
|
16
|
+
|
17
|
+
swift:
|
18
|
+
- timestamp_default_swift: Default
|
19
|
+
- timestamp_align_swift: Alignments
|
20
|
+
- timestamp_timezones_swift: Timezones
|
21
|
+
- timestamp_updated_swift: Last Updated by
|
22
|
+
- timestamp_elapsed_swift: Time Ago
|
23
|
+
- timestamp_props_swift: ""
|