playbook_ui_docs 13.12.0 → 13.13.0.pre.alpha.play900startratingasinput1657
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_star_rating/docs/_star_rating_background_options.html.erb +2 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.jsx +25 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.html.erb +3 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.jsx +31 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb +6 -8
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +19 -6
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb +3 -1
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +22 -5
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.html.erb +6 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.jsx +58 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.html.erb +16 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.jsx +60 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +12 -5
- data/app/pb_kits/playbook/pb_star_rating/docs/index.js +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 +41 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ea9616a1a0ebfeb207646e73702e51eaad93c2a6051126363db8d1cbaa2a674
|
4
|
+
data.tar.gz: 125091d72d224c90a9aff3905a753e975addb7514c9a2ea34f6ba9488bcb07bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db21daeb18c456a242a57e1534923d99261be6b2d0a5a03192f46d29fb4a2702f25befdd28ebb98f47b70aba3b222d79b43a66f80a7b454092b0e17aeda2f841
|
7
|
+
data.tar.gz: a6702ed707537ccae106f2c5c46a7a9d60eaa1219fb1e82e843a98b238b4ac1e82928367dbf20c312dccd0db4e9f3204d3d72f7d834694df703c8a3d02d9230c
|
@@ -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,25 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import StarRating from '../_star_rating'
|
4
|
+
|
5
|
+
const StarRatingBackgroundOptions = (props) => (
|
6
|
+
<>
|
7
|
+
|
8
|
+
<StarRating
|
9
|
+
paddingBottom="xs"
|
10
|
+
rating={3}
|
11
|
+
{...props}
|
12
|
+
/>
|
13
|
+
|
14
|
+
|
15
|
+
<StarRating
|
16
|
+
backgroundType='outline'
|
17
|
+
paddingBottom="xs"
|
18
|
+
rating={3}
|
19
|
+
{...props}
|
20
|
+
/>
|
21
|
+
|
22
|
+
</>
|
23
|
+
)
|
24
|
+
|
25
|
+
export default StarRatingBackgroundOptions
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
|
2
|
+
<%= pb_rails("star_rating", props: { rating: 3, color_option: "primary", padding_bottom: "xs" }) %>
|
3
|
+
<%= pb_rails("star_rating", props: { rating: 3, color_option: "subtle", padding_bottom: "xs" }) %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import StarRating from '../_star_rating'
|
4
|
+
|
5
|
+
const StarRatingColorOptions = (props) => (
|
6
|
+
<>
|
7
|
+
|
8
|
+
<StarRating
|
9
|
+
paddingBottom="xs"
|
10
|
+
rating={3}
|
11
|
+
{...props}
|
12
|
+
/>
|
13
|
+
|
14
|
+
<StarRating
|
15
|
+
colorOption='primary'
|
16
|
+
paddingBottom="xs"
|
17
|
+
rating={3}
|
18
|
+
{...props}
|
19
|
+
/>
|
20
|
+
|
21
|
+
<StarRating
|
22
|
+
colorOption='subtle'
|
23
|
+
paddingBottom="xs"
|
24
|
+
rating={3}
|
25
|
+
{...props}
|
26
|
+
/>
|
27
|
+
|
28
|
+
</>
|
29
|
+
)
|
30
|
+
|
31
|
+
export default StarRatingColorOptions
|
@@ -1,13 +1,11 @@
|
|
1
|
-
<%= pb_rails("star_rating") %>
|
1
|
+
<%= pb_rails("star_rating", props: { padding_bottom: "xs" }) %>
|
2
2
|
|
3
|
-
|
3
|
+
<%= pb_rails("star_rating", props: { rating: 1, padding_bottom: "xs" }) %>
|
4
4
|
|
5
|
-
<%= pb_rails("star_rating", props: { rating:
|
5
|
+
<%= pb_rails("star_rating", props: { rating: 2, padding_bottom: "xs" }) %>
|
6
6
|
|
7
|
-
|
7
|
+
<%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
|
8
8
|
|
9
|
-
<%= pb_rails("star_rating", props: { rating:
|
9
|
+
<%= pb_rails("star_rating", props: { rating: 4, padding_bottom: "xs" }) %>
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
<%= pb_rails("star_rating", props: { rating: 5 }) %>
|
11
|
+
<%= pb_rails("star_rating", props: { rating: 5, padding_bottom: "xs" }) %>
|
@@ -4,25 +4,38 @@ import StarRating from '../_star_rating'
|
|
4
4
|
|
5
5
|
const StarRatingDefault = (props) => (
|
6
6
|
<>
|
7
|
-
<StarRating
|
7
|
+
<StarRating
|
8
|
+
paddingBottom="xs"
|
9
|
+
{...props}
|
10
|
+
/>
|
8
11
|
|
9
|
-
<br />
|
10
12
|
|
11
13
|
<StarRating
|
12
|
-
|
14
|
+
paddingBottom="xs"
|
15
|
+
rating={0.9}
|
13
16
|
{...props}
|
14
17
|
/>
|
15
18
|
|
16
|
-
<br />
|
17
|
-
|
18
19
|
<StarRating
|
20
|
+
paddingBottom="xs"
|
19
21
|
rating={1.5}
|
20
22
|
{...props}
|
21
23
|
/>
|
22
24
|
|
23
|
-
<
|
25
|
+
<StarRating
|
26
|
+
paddingBottom="xs"
|
27
|
+
rating={3}
|
28
|
+
{...props}
|
29
|
+
/>
|
30
|
+
|
31
|
+
<StarRating
|
32
|
+
paddingBottom="xs"
|
33
|
+
rating={4.2}
|
34
|
+
{...props}
|
35
|
+
/>
|
24
36
|
|
25
37
|
<StarRating
|
38
|
+
paddingBottom="xs"
|
26
39
|
rating={5}
|
27
40
|
{...props}
|
28
41
|
/>
|
@@ -1 +1,3 @@
|
|
1
|
-
<%= pb_rails("star_rating", props: { rating: 3
|
1
|
+
<%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
|
2
|
+
<%= pb_rails("star_rating", props: { rating: 3, layout_option: "number", padding_bottom: "xs" }) %>
|
3
|
+
<%= pb_rails("star_rating", props: { rating: 3, layout_option: "onestar", padding_bottom: "xs" }) %>
|
@@ -3,13 +3,30 @@ import React from 'react'
|
|
3
3
|
import StarRating from '../_star_rating'
|
4
4
|
|
5
5
|
const StarRatingHide = (props) => (
|
6
|
+
<>
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
<StarRating
|
9
|
+
paddingBottom="xs"
|
10
|
+
rating={3}
|
11
|
+
{...props}
|
12
|
+
/>
|
12
13
|
|
14
|
+
|
15
|
+
<StarRating
|
16
|
+
layoutOption={"number"}
|
17
|
+
paddingBottom="xs"
|
18
|
+
rating={3}
|
19
|
+
{...props}
|
20
|
+
/>
|
21
|
+
|
22
|
+
<StarRating
|
23
|
+
layoutOption={"onestar"}
|
24
|
+
paddingBottom="xs"
|
25
|
+
rating={3}
|
26
|
+
{...props}
|
27
|
+
/>
|
28
|
+
|
29
|
+
</>
|
13
30
|
)
|
14
31
|
|
15
32
|
export default StarRatingHide
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= pb_rails("star_rating", props: { rating: 3, denominator: 3, padding_bottom: "xs" }) %>
|
2
|
+
<%= pb_rails("star_rating", props: { rating: 3, denominator: 4, padding_bottom: "xs" }) %>
|
3
|
+
<%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
|
4
|
+
<%= pb_rails("star_rating", props: { rating: 3, denominator: 6, padding_bottom: "xs" }) %>
|
5
|
+
<%= pb_rails("star_rating", props: { rating: 3, denominator: 7, padding_bottom: "xs" }) %>
|
6
|
+
<%= pb_rails("star_rating", props: { rating: 3, denominator: 8, padding_bottom: "xs" }) %>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import StarRating from '../_star_rating'
|
4
|
+
|
5
|
+
const StarRatingNumberConfig = (props) => (
|
6
|
+
<>
|
7
|
+
|
8
|
+
<StarRating
|
9
|
+
denominator={3}
|
10
|
+
paddingBottom="xs"
|
11
|
+
rating={3}
|
12
|
+
{...props}
|
13
|
+
/>
|
14
|
+
|
15
|
+
|
16
|
+
<StarRating
|
17
|
+
denominator={4}
|
18
|
+
paddingBottom="xs"
|
19
|
+
rating={3}
|
20
|
+
{...props}
|
21
|
+
/>
|
22
|
+
|
23
|
+
|
24
|
+
<StarRating
|
25
|
+
denominator={5}
|
26
|
+
paddingBottom="xs"
|
27
|
+
rating={3}
|
28
|
+
{...props}
|
29
|
+
/>
|
30
|
+
|
31
|
+
|
32
|
+
<StarRating
|
33
|
+
denominator={6}
|
34
|
+
paddingBottom="xs"
|
35
|
+
rating={3}
|
36
|
+
{...props}
|
37
|
+
/>
|
38
|
+
|
39
|
+
|
40
|
+
<StarRating
|
41
|
+
denominator={7}
|
42
|
+
paddingBottom="xs"
|
43
|
+
rating={3}
|
44
|
+
{...props}
|
45
|
+
/>
|
46
|
+
|
47
|
+
|
48
|
+
<StarRating
|
49
|
+
denominator={8}
|
50
|
+
paddingBottom="xs"
|
51
|
+
rating={3}
|
52
|
+
{...props}
|
53
|
+
/>
|
54
|
+
|
55
|
+
</>
|
56
|
+
)
|
57
|
+
|
58
|
+
export default StarRatingNumberConfig
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%= pb_rails("star_rating", props: { rating: 3, size: "xs", padding_bottom: "xs" }) %>
|
2
|
+
|
3
|
+
|
4
|
+
<%= pb_rails("star_rating", props: { rating: 3, size: "sm", padding_bottom: "xs" }) %>
|
5
|
+
|
6
|
+
|
7
|
+
<%= pb_rails("star_rating", props: { rating: 3, size: "md", padding_bottom: "xs" }) %>
|
8
|
+
|
9
|
+
|
10
|
+
<%= pb_rails("star_rating", props: { rating: 3, size: "lg", padding_bottom: "xs" }) %>
|
11
|
+
|
12
|
+
|
13
|
+
<%= pb_rails("star_rating", props: { rating: 3, size: "lg", layout_option: "number", padding_bottom: "xs" }) %>
|
14
|
+
|
15
|
+
|
16
|
+
<%= pb_rails("star_rating", props: { rating: 3, size: "lg", layout_option: "onestar", padding_bottom: "xs" }) %>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import StarRating from '../_star_rating'
|
4
|
+
|
5
|
+
const StarRatingSizeOptions = (props) => (
|
6
|
+
<>
|
7
|
+
|
8
|
+
<StarRating
|
9
|
+
paddingBottom="xs"
|
10
|
+
rating={3}
|
11
|
+
size="xs"
|
12
|
+
{...props}
|
13
|
+
/>
|
14
|
+
|
15
|
+
|
16
|
+
<StarRating
|
17
|
+
paddingBottom="xs"
|
18
|
+
rating={3}
|
19
|
+
size="sm"
|
20
|
+
{...props}
|
21
|
+
/>
|
22
|
+
|
23
|
+
|
24
|
+
<StarRating
|
25
|
+
paddingBottom="xs"
|
26
|
+
rating={3}
|
27
|
+
size="md"
|
28
|
+
{...props}
|
29
|
+
/>
|
30
|
+
|
31
|
+
|
32
|
+
<StarRating
|
33
|
+
paddingBottom="xs"
|
34
|
+
rating={3}
|
35
|
+
size="lg"
|
36
|
+
{...props}
|
37
|
+
/>
|
38
|
+
|
39
|
+
|
40
|
+
<StarRating
|
41
|
+
layoutOption="number"
|
42
|
+
paddingBottom="xs"
|
43
|
+
rating={3}
|
44
|
+
size="lg"
|
45
|
+
{...props}
|
46
|
+
/>
|
47
|
+
|
48
|
+
|
49
|
+
<StarRating
|
50
|
+
layoutOption="onestar"
|
51
|
+
paddingBottom="xs"
|
52
|
+
rating={3}
|
53
|
+
size="lg"
|
54
|
+
{...props}
|
55
|
+
/>
|
56
|
+
|
57
|
+
</>
|
58
|
+
)
|
59
|
+
|
60
|
+
export default StarRatingSizeOptions
|
@@ -1,9 +1,16 @@
|
|
1
1
|
examples:
|
2
|
-
|
3
2
|
rails:
|
4
|
-
|
5
|
-
|
3
|
+
- star_rating_default: Default
|
4
|
+
- star_rating_color_options: Color Options
|
5
|
+
- star_rating_background_options: Background Options
|
6
|
+
- star_rating_hide: Layout Options
|
7
|
+
- star_rating_number_config: Number Config
|
8
|
+
- star_rating_size_options: Size Options
|
6
9
|
|
7
10
|
react:
|
8
|
-
|
9
|
-
|
11
|
+
- star_rating_default: Default
|
12
|
+
- star_rating_color_options: Color Options
|
13
|
+
- star_rating_background_options: Background Options
|
14
|
+
- star_rating_hide: Layout Options
|
15
|
+
- star_rating_number_config: Number Config
|
16
|
+
- star_rating_size_options: Size Options
|
@@ -1,3 +1,11 @@
|
|
1
1
|
export { default as StarRatingDefault } from './_star_rating_default.jsx'
|
2
2
|
|
3
|
+
export { default as StarRatingColorOptions } from './_star_rating_color_options.jsx'
|
4
|
+
|
5
|
+
export { default as StarRatingBackgroundOptions } from './_star_rating_background_options.jsx'
|
6
|
+
|
3
7
|
export { default as StarRatingHide } from './_star_rating_hide.jsx'
|
8
|
+
|
9
|
+
export { default as StarRatingNumberConfig } from './_star_rating_number_config.jsx'
|
10
|
+
|
11
|
+
export { default as StarRatingSizeOptions } from './_star_rating_size_options.jsx'
|
@@ -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
|
+
```
|