playbook_ui_docs 13.12.0 → 13.13.0.pre.alpha.PLAY1090csstokens1675
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_filter/docs/_filter_default.md +1 -0
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default_swift.md +11 -0
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_props_swift.md +7 -0
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse_swift.md +13 -0
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_size_swift.md +11 -0
- data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +6 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md +15 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md +5 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md +15 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md +15 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +6 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children_swift.md +14 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_dashed_swift.md +7 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_line_swift.md +8 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_props_swift.md +8 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text_swift.md +7 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical_swift.md +18 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on_swift.md +35 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default_swift.md +29 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled_swift.md +13 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md +24 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_props_swift.md +13 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default_swift.md +27 -0
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error_swift.md +11 -0
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_props_swift.md +9 -0
- data/app/pb_kits/playbook/pb_textarea/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default_swift.md +11 -0
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name_swift.md +10 -0
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_props_swift.md +6 -0
- data/app/pb_kits/playbook/pb_toggle/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +2 -2
- data/dist/playbook-doc.js +8 -8
- metadata +33 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bb0a545b88b6360207fb88113d4ae35088a1e63d3ddbada1ee3cb64abc34383
|
4
|
+
data.tar.gz: 5a635feff777a5f8b00b08c7e7447bdf7ae60feeef59d810626f8ed269fe7624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b79ac876ba8cc0b4f7e13c6a6c2a4802b1975fadf31e86ceb7ff0d2e872980147ef773be6d542b11d098fdb592a2ba7dda24db85195d6aaabd3080d9ffcaa933
|
7
|
+
data.tar.gz: 6b7d6a9e0f18fe844c5046776271286c96f80ddbb0a5ca3b4990a698717025732c9046263c87a0e65b886d9b665273ad087484935ef970766b2d68a4dd94459f
|
@@ -0,0 +1 @@
|
|
1
|
+
To display the "No Filters Selected" text, the `filters` prop must be `null`. As a suggestion, check the values of each key in your filters object. If they are all falsy, return `null`.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
![mulitple-users-default](https://github.com/powerhome/playbook/assets/92755007/73dffd55-14f7-468e-b6ea-4e700980183d)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
let twoUsers = [andrew, picAndrew]
|
6
|
+
|
7
|
+
PBDoc(title: "xSmall") {
|
8
|
+
PBMultipleUsers(users: twoUsers, size: .xSmall)
|
9
|
+
}
|
10
|
+
|
11
|
+
```
|
@@ -0,0 +1,7 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **Users** | `[PBUser]` | Sets the user's avatars | | |
|
5
|
+
| **Size** | `AvatarSize` | Changes the size of the avatars | `.small` | `.xSmall` `.small` |
|
6
|
+
| **Reversed** | `Bool` | Changes the order of the avatars | `false` | `true` `false` |
|
7
|
+
| **Max Displayed Users** | `Int` | Limits the number of avatars displayed | `4` | |
|
@@ -0,0 +1,13 @@
|
|
1
|
+
![multiple-users-reverse](https://github.com/powerhome/playbook/assets/92755007/be3f6f7d-f699-40f2-bbb6-8a99144a8744)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
let multipleUsers = [andrew, picAndrew, andrew, andrew]
|
6
|
+
let twoUsers = [andrew, picAndrew]
|
7
|
+
|
8
|
+
VStack(alignment: .leading, spacing: Spacing.small) {
|
9
|
+
PBMultipleUsers(users: multipleUsers, size: .small, reversed: true)
|
10
|
+
PBMultipleUsers(users: twoUsers, size: .small, reversed: true)
|
11
|
+
}
|
12
|
+
|
13
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
![mulitple-users-size](https://github.com/powerhome/playbook/assets/92755007/5c15b862-fb32-4e0a-a826-bc25b1db555e)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
let multipleUsers = [andrew, picAndrew, andrew, andrew]
|
6
|
+
|
7
|
+
PBDoc(title: "Small") {
|
8
|
+
PBMultipleUsers(users: multipleUsers, size: .small)
|
9
|
+
}
|
10
|
+
|
11
|
+
```
|
@@ -10,3 +10,9 @@ examples:
|
|
10
10
|
- multiple_users_default: Default
|
11
11
|
- multiple_users_reverse: Reverse
|
12
12
|
- multiple_users_size: Size
|
13
|
+
|
14
|
+
swift:
|
15
|
+
- multiple_users_default_swift: Default
|
16
|
+
- multiple_users_reverse_swift: Reverse
|
17
|
+
- multiple_users_size_swift: Small
|
18
|
+
- multiple_users_props_swift: ""
|
data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
![mulitple-users-stacked-default](https://github.com/powerhome/playbook/assets/92755007/180e1275-3eb6-4b28-b1ef-bdde45ab3c2e)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
let oneUser = [andrew]
|
6
|
+
let twoUsers = [andrew, picAndrew]
|
7
|
+
let multipleUsers = [andrew, picAndrew, andrew, andrew]
|
8
|
+
|
9
|
+
HStack(spacing: Spacing.xSmall) {
|
10
|
+
PBMultipleUsersStacked(users: oneUser, size: .default)
|
11
|
+
PBMultipleUsersStacked(users: twoUsers, size: .default)
|
12
|
+
PBMultipleUsersStacked(users: multipleUsers, size: .default)
|
13
|
+
}
|
14
|
+
|
15
|
+
```
|
data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **Users** | `[PBUser]` | Sets the user's avatars | | |
|
5
|
+
| **Size** | `Size` | Changes the size of the avatars | `.small` | `.default` `.small` `.xSmall` |
|
data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
![mulitple-users-stacked-small](https://github.com/powerhome/playbook/assets/92755007/277fd685-6302-462e-a02a-18a8fcb57715)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
let oneUser = [andrew]
|
6
|
+
let twoUsers = [andrew, picAndrew]
|
7
|
+
let multipleUsers = [andrew, picAndrew, andrew, andrew]
|
8
|
+
|
9
|
+
HStack(spacing: Spacing.xSmall) {
|
10
|
+
PBMultipleUsersStacked(users: oneUser)
|
11
|
+
PBMultipleUsersStacked(users: twoUsers)
|
12
|
+
PBMultipleUsersStacked(users: multipleUsers)
|
13
|
+
}
|
14
|
+
|
15
|
+
```
|
data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
![mulitple-users-stacked-xsmall](https://github.com/powerhome/playbook/assets/92755007/4f31976f-a41b-4923-9230-5015f6ad75f8)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
let oneUser = [andrew]
|
6
|
+
let twoUsers = [andrew, picAndrew]
|
7
|
+
let multipleUsers = [andrew, picAndrew, andrew, andrew]
|
8
|
+
|
9
|
+
HStack(spacing: Spacing.xSmall) {
|
10
|
+
PBMultipleUsersStacked(users: oneUser, size: .xSmall)
|
11
|
+
PBMultipleUsersStacked(users: twoUsers, size: .xSmall)
|
12
|
+
PBMultipleUsersStacked(users: multipleUsers, size: .xSmall)
|
13
|
+
}
|
14
|
+
|
15
|
+
```
|
@@ -6,3 +6,9 @@ examples:
|
|
6
6
|
|
7
7
|
react:
|
8
8
|
- multiple_users_stacked_default: Default
|
9
|
+
|
10
|
+
swift:
|
11
|
+
- multiple_users_stacked_default_swift: Default
|
12
|
+
- multiple_users_stacked_small_swift: Small
|
13
|
+
- multiple_users_stacked_xsmall_swift: xSmall
|
14
|
+
- multiple_users_stacked_props_swift: ""
|
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
![section-separator-children](https://github.com/powerhome/playbook/assets/92755007/acd6a8eb-d034-4efd-b2e6-afabe739e678)
|
3
|
+
|
4
|
+
```swift
|
5
|
+
|
6
|
+
PBSectionSeparator(variant: .dashed) {
|
7
|
+
PBCard(alignment: .center, borderRadius: BorderRadius.rounded, padding: Spacing.xxSmall, width: 70) {
|
8
|
+
Text("Today")
|
9
|
+
.pbFont(.caption)
|
10
|
+
.frame(maxWidth: .infinity, alignment: .center)
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
```
|
@@ -0,0 +1,8 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **text** | `String` | Adds text to the Section Separator | `nil` | |
|
5
|
+
| **orientation** | `Orientation` | Changes the orientation | `.horizontal` | `.horizontal` `.vertical` |
|
6
|
+
| **variant** | `Variant` | Changes the style of the Section Separator | `.card` | `.dashed` `.card` |
|
7
|
+
| **dividerOpacity** | `CGFloat` | Adjusts the opacity of the divider | `1` | |
|
8
|
+
| **margin** | `CGFloat` | Adds margin between text and the divider | `Spacing.xSmall` | `Spacing.none` `Spacing.xxSmall` `Spacing.xSmall` `Spacing.small` `Spacing.medium` `Spacing.large` `Spacing.xLarge` |
|
@@ -0,0 +1,18 @@
|
|
1
|
+
![section-separator-verticle](https://github.com/powerhome/playbook/assets/92755007/21ca54a5-6b8a-459f-91ad-4e9b68258f68)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
let loremIpsum: some View = Text(
|
6
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididt labore et dolore"
|
7
|
+
)
|
8
|
+
|
9
|
+
HStack(spacing: Spacing.none) {
|
10
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididt labore et dolore"
|
11
|
+
PBSectionSeparator(orientation: .vertical)
|
12
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididt labore et dolore"
|
13
|
+
}
|
14
|
+
.frame(maxWidth: .infinity)
|
15
|
+
.frame(height: 120, alignment: .center)
|
16
|
+
.listRowSeparator(.hidden)
|
17
|
+
|
18
|
+
```
|
@@ -13,3 +13,11 @@ examples:
|
|
13
13
|
- section_separator_text: Text Separator
|
14
14
|
- section_separator_vertical: Vertical
|
15
15
|
- section_separator_children: Children
|
16
|
+
|
17
|
+
swift:
|
18
|
+
- section_separator_line_swift: Line Separator
|
19
|
+
- section_separator_dashed_swift: Dashed Separator
|
20
|
+
- section_separator_text_swift: Text Separator
|
21
|
+
- section_separator_vertical_swift: Vertical
|
22
|
+
- section_separator_children_swift: Children
|
23
|
+
- section_separator_props_swift: ""
|
@@ -0,0 +1,35 @@
|
|
1
|
+
![text-input-add-on](https://github.com/powerhome/playbook/assets/92755007/65a28e6a-9e65-4ca1-af8d-91dae6eac4f5)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
PBTextInput(
|
6
|
+
"ADD ON WITH DEFAULTS",
|
7
|
+
text: $textAddOn,
|
8
|
+
style: .rightIcon(.user, divider: true)
|
9
|
+
)
|
10
|
+
|
11
|
+
PBTextInput(
|
12
|
+
"RIGHT-ALIGNED ADD ON WITH BORDER",
|
13
|
+
text: $textAddOnRight,
|
14
|
+
style: .rightIcon(.user, divider: true)
|
15
|
+
)
|
16
|
+
|
17
|
+
PBTextInput(
|
18
|
+
"RIGHT-ALIGNED ADD ON WITH NO BORDER",
|
19
|
+
text: $textAddOnRightNoBorder,
|
20
|
+
style: .rightIcon(.user, divider: false)
|
21
|
+
)
|
22
|
+
|
23
|
+
PBTextInput(
|
24
|
+
"LEFT-ALIGNED ADD ON WITH NO BORDER",
|
25
|
+
text: $textAddOnLeft,
|
26
|
+
style: .leftIcon(.user, divider: false)
|
27
|
+
)
|
28
|
+
|
29
|
+
PBTextInput(
|
30
|
+
"LEFT-ALIGNED ADD ON WITH BORDER",
|
31
|
+
text: $textAddOnLeftNoBorder,
|
32
|
+
style: .leftIcon(.user, divider: true)
|
33
|
+
)
|
34
|
+
|
35
|
+
```
|
@@ -0,0 +1,29 @@
|
|
1
|
+
![text-input-default](https://github.com/powerhome/playbook/assets/92755007/625a246e-9d5c-42ea-8c6e-7afcf0984c9a)
|
2
|
+
|
3
|
+
|
4
|
+
```swift
|
5
|
+
|
6
|
+
@State private var textFirstName: String = ""
|
7
|
+
@State private var textLastName: String = ""
|
8
|
+
@State private var textPhone: String = ""
|
9
|
+
|
10
|
+
PBTextInput(
|
11
|
+
"First name",
|
12
|
+
text: $textFirstName,
|
13
|
+
placeholder: "Enter first name"
|
14
|
+
)
|
15
|
+
|
16
|
+
PBTextInput(
|
17
|
+
"Last name",
|
18
|
+
text: $textLastName,
|
19
|
+
placeholder: "Enter last name"
|
20
|
+
)
|
21
|
+
|
22
|
+
PBTextInput(
|
23
|
+
"Phone number",
|
24
|
+
text: $textPhone,
|
25
|
+
placeholder: "Enter phone number",
|
26
|
+
keyboardType: .phonePad
|
27
|
+
)
|
28
|
+
|
29
|
+
```
|
@@ -0,0 +1,24 @@
|
|
1
|
+
![text-input-error](https://github.com/powerhome/playbook/assets/92755007/7c664f75-1d7a-4a94-bc59-6f845a68ce19)
|
2
|
+
|
3
|
+
|
4
|
+
```swift
|
5
|
+
|
6
|
+
@State private var textError: String = ""
|
7
|
+
@State private var textConfirmError: String = ""
|
8
|
+
|
9
|
+
PBTextInput(
|
10
|
+
"Email address",
|
11
|
+
text: $textError,
|
12
|
+
placeholder: "Enter email address",
|
13
|
+
error: (true, "Insert a valid email"),
|
14
|
+
style: .leftIcon(.user, divider: true)
|
15
|
+
)
|
16
|
+
|
17
|
+
PBTextInput(
|
18
|
+
"Confirm email address",
|
19
|
+
text: $textConfirmError,
|
20
|
+
placeholder: "Confirm email address",
|
21
|
+
style: .leftIcon(.user, divider: true)
|
22
|
+
)
|
23
|
+
|
24
|
+
```
|
@@ -0,0 +1,13 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **title** | `String` | Adds a title | `nil` | |
|
5
|
+
| **placeholder** | `String` | Adds placeholder text | `""` | |
|
6
|
+
| **error** | `(Bool, String)` | Changes the style of the Text Input | `nil` | |
|
7
|
+
| **style** | `Style` | Changes the style of the Text Input | `.default` | `.default` `.rightIcon` `.leftIcon` `.inline` `.disabled` |
|
8
|
+
| **onChange** | `Bool` | Adds an event handler | `nil` | |
|
9
|
+
| **keyboardType** | `UIKeyboardType` | Speficies the keyboard type (ios only) | `.default` | |
|
10
|
+
| **text** | `String` | Sets the Text Input's text value | | |
|
11
|
+
| **selected** | `Bool` | Changes the style of the Text Input | | `true` `false` |
|
12
|
+
| **isHovering** | `Bool` | Changes the style of the Text Input | `false` | `true` `false` |
|
13
|
+
| **isIconHovering** | `Bool` | Changes the style of the Text Input | `false` | `true` `false` |
|
@@ -16,3 +16,10 @@ examples:
|
|
16
16
|
- text_input_add_on: Add On
|
17
17
|
- text_input_inline: Inline
|
18
18
|
- text_input_no_label: No Label
|
19
|
+
|
20
|
+
swift:
|
21
|
+
- text_input_default_swift: Default
|
22
|
+
- text_input_error_swift: With Error
|
23
|
+
- text_input_disabled_swift: Disabled
|
24
|
+
- text_input_add_on_swift: Add On
|
25
|
+
- text_input_props_swift: ""
|
@@ -0,0 +1,27 @@
|
|
1
|
+
![textarea-default](https://github.com/powerhome/playbook/assets/92755007/40eec958-63d7-4840-bf5c-f8d1e34c911a)
|
2
|
+
|
3
|
+
```swift
|
4
|
+
|
5
|
+
@State var defaultText = ""
|
6
|
+
@State var placeholderText = ""
|
7
|
+
@State var customText = "Default value text"
|
8
|
+
|
9
|
+
VStack(alignment: .leading, spacing: Spacing.small) {
|
10
|
+
PBTextArea(
|
11
|
+
"Label",
|
12
|
+
text: $defaultText
|
13
|
+
)
|
14
|
+
|
15
|
+
PBTextArea(
|
16
|
+
"Label",
|
17
|
+
text: $placeholderText,
|
18
|
+
placeholder: "Placeholder with text"
|
19
|
+
)
|
20
|
+
|
21
|
+
PBTextArea(
|
22
|
+
"Label",
|
23
|
+
text: $customText
|
24
|
+
)
|
25
|
+
}
|
26
|
+
|
27
|
+
```
|
@@ -0,0 +1,9 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **characterCount** | `CharacterCount` | Adds a character counter to the Textarea | `.noCount` | `.noCount` `.count` `.maxCharacterCount` `.maxCharacterCountBlock` `.maxCharacterCountError` |
|
5
|
+
| **inline** | `Bool` | Changes the style of the Textarea | `false` | `true` `false` |
|
6
|
+
| **label** | `String` | Adds a label | `nil` | |
|
7
|
+
| **placeholder** | `String` | Adds placeholder text | `nil` | |
|
8
|
+
| **text** | `String` | Sets the Textarea's text value | `Binding<String>` | |
|
9
|
+
| **error** | `String` | Changes the style of the Textarea | `nil` | |
|
@@ -0,0 +1,6 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **isHovering** | `Bool` | Changes the style of the Toggle | `false` | `true` `false` |
|
5
|
+
| **label** | `String` | Adds a label to the Toggle | `nil` | |
|
6
|
+
| **checked** | `Bool` | Changes the style of the Toggle | | `true` `false` |
|
@@ -70,8 +70,8 @@ const TypeaheadWithHighlight = (props) => {
|
|
70
70
|
}
|
71
71
|
|
72
72
|
const customComponents = {
|
73
|
-
Option: (
|
74
|
-
<components.Option {...
|
73
|
+
Option: (highlightProps: OptionProps) => (
|
74
|
+
<components.Option {...highlightProps}/>
|
75
75
|
),
|
76
76
|
SingleValue: ({ data }: any) => (
|
77
77
|
<span>{data.name}</span>
|