playbook_ui_docs 13.13.0.pre.alpha.play900startratingasinput1657 → 13.13.0.pre.alpha.play10221678
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_date_picker/docs/_date_picker_quick_pick_custom.html.erb +29 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.jsx +34 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.md +7 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb +28 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.jsx +34 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.md +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb +8 -6
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +6 -19
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb +1 -3
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +5 -22
- data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +5 -12
- data/app/pb_kits/playbook/pb_star_rating/docs/index.js +0 -8
- data/dist/playbook-doc.js +8 -8
- metadata +8 -10
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.html.erb +0 -2
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.jsx +0 -25
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.html.erb +0 -3
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.jsx +0 -31
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.html.erb +0 -6
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.jsx +0 -58
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.html.erb +0 -16
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.jsx +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ed5f092b2d08dbaa2e7a36c3fcfd931e2f5cfe26d35fd553789bb029c620e63
|
4
|
+
data.tar.gz: 947c21a797f7c633cf6b1982acdc408f782e68d761ae1ec8fa0938ff07883b14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44d1f4c358ffb7f2b5ff5f44a913d1a669a1afdfaea4114a3abac63d4a8b61b0a25ca357242cbde6183f93e53658c71da36558927cc026611350885c8de339d6
|
7
|
+
data.tar.gz: 96a590487494497046d5dbd904863d109a6a770ec6a38de8d443495162040e340cf097ef3a7b8153b6b1a40ef618346b236db0b92f202759a362c92e9d4c342a
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<%= pb_rails("date_picker", props: {
|
2
|
+
allow_input: true,
|
3
|
+
custom_quick_pick_dates: {
|
4
|
+
dates: [
|
5
|
+
# Allow Playbook to handle the logic...
|
6
|
+
{
|
7
|
+
label: "Last 15 months",
|
8
|
+
value: {
|
9
|
+
timePeriod: "months",
|
10
|
+
amount: 15,
|
11
|
+
},
|
12
|
+
},
|
13
|
+
# Or, be explicit with an exact date range for more control...
|
14
|
+
{
|
15
|
+
label: "First Week of June 2022",
|
16
|
+
value: ["06/01/2022", "06/07/2022"],
|
17
|
+
},
|
18
|
+
],
|
19
|
+
},
|
20
|
+
end_date_id: "quick-pick-end-date",
|
21
|
+
end_date_name: "quick-pick-end-date",
|
22
|
+
mode: "range",
|
23
|
+
picker_id: "date-picker-quick-pick-custom",
|
24
|
+
placeholder: "mm/dd/yyyy to mm/dd/yyyy",
|
25
|
+
selection_type: "quickpick",
|
26
|
+
start_date_id: "quick-pick-start-date",
|
27
|
+
start_date_name: "quick-pick-start-date"
|
28
|
+
}) %>
|
29
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import DatePicker from "../_date_picker"
|
3
|
+
|
4
|
+
const DatePickerQuickPickCustom = (props) => (
|
5
|
+
<>
|
6
|
+
<DatePicker
|
7
|
+
allowInput
|
8
|
+
customQuickPickDates={{
|
9
|
+
dates: [
|
10
|
+
// Allow Playbook to handle the logic...
|
11
|
+
{
|
12
|
+
label: "Last 15 months",
|
13
|
+
value: {
|
14
|
+
timePeriod: "months",
|
15
|
+
amount: 15,
|
16
|
+
},
|
17
|
+
},
|
18
|
+
// Or, be explicit with an exact date range for more control...
|
19
|
+
{
|
20
|
+
label: "First Week of June 2022",
|
21
|
+
value: ["06/01/2022", "06/07/2022"],
|
22
|
+
},
|
23
|
+
],
|
24
|
+
}}
|
25
|
+
mode='range'
|
26
|
+
pickerId='date-picker-quick-pick-custom-override'
|
27
|
+
placeholder='mm/dd/yyyy to mm/dd/yyyy'
|
28
|
+
selectionType='quickpick'
|
29
|
+
{...props}
|
30
|
+
/>
|
31
|
+
</>
|
32
|
+
)
|
33
|
+
|
34
|
+
export default DatePickerQuickPickCustom
|
@@ -0,0 +1,7 @@
|
|
1
|
+
The customQuickPickDates/custom_quick_pick_dates prop allows for the user/dev to define their own quick pick dates.
|
2
|
+
The prop accepts an object with two key/value pairs: dates & override (separate doc example below).
|
3
|
+
|
4
|
+
The dates property accepts an array of objects. Each object in the array has label and value properties. The label is what will be displayed in the UI of the dropdown menu. The value property is just the date that is going to be passed to the datepicker. The value property can be an array of two strings that represent a range, allowing for the dev to be extremely specific. Additionally, the dates array allows for a clean, simple API under that automatically converts dates in a common vernacular.
|
5
|
+
|
6
|
+
The timePeriod property accepts "days", "weeks", "months", "quarters" or "years", representing past time periods.
|
7
|
+
The amount property accepts any number.
|
data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
<%= pb_rails("date_picker", props: {
|
2
|
+
allow_input: true,
|
3
|
+
custom_quick_pick_dates: {
|
4
|
+
override: false,
|
5
|
+
dates: [
|
6
|
+
{
|
7
|
+
label: "Last 15 months",
|
8
|
+
value: {
|
9
|
+
timePeriod: "months",
|
10
|
+
amount: 15,
|
11
|
+
},
|
12
|
+
},
|
13
|
+
{
|
14
|
+
label: "First Week of June 2022",
|
15
|
+
value: ["06/01/2022", "06/07/2022"],
|
16
|
+
},
|
17
|
+
],
|
18
|
+
},
|
19
|
+
end_date_id: "quick-pick-end-date",
|
20
|
+
end_date_name: "quick-pick-end-date",
|
21
|
+
mode: "range",
|
22
|
+
picker_id: "date-picker-quick-pick-override",
|
23
|
+
placeholder: "mm/dd/yyyy to mm/dd/yyyy",
|
24
|
+
selection_type: "quickpick",
|
25
|
+
start_date_id: "quick-pick-start-date",
|
26
|
+
start_date_name: "quick-pick-start-date"
|
27
|
+
}) %>
|
28
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import DatePicker from "../_date_picker"
|
3
|
+
|
4
|
+
const DatePickerQuickPickCustomOverride = (props) => (
|
5
|
+
<>
|
6
|
+
<DatePicker
|
7
|
+
allowInput
|
8
|
+
customQuickPickDates={{
|
9
|
+
override: false,
|
10
|
+
dates: [
|
11
|
+
{
|
12
|
+
label: "Last 15 months",
|
13
|
+
value: {
|
14
|
+
timePeriod: "months",
|
15
|
+
amount: 15,
|
16
|
+
},
|
17
|
+
},
|
18
|
+
{
|
19
|
+
label: "First Week of June 2022",
|
20
|
+
value: ["06/01/2022", "06/07/2022"],
|
21
|
+
},
|
22
|
+
],
|
23
|
+
}}
|
24
|
+
marginTop='lg'
|
25
|
+
mode='range'
|
26
|
+
pickerId='date-picker-quick-pick-custom'
|
27
|
+
placeholder='mm/dd/yyyy to mm/dd/yyyy'
|
28
|
+
selectionType='quickpick'
|
29
|
+
{...props}
|
30
|
+
/>
|
31
|
+
</>
|
32
|
+
)
|
33
|
+
|
34
|
+
export default DatePickerQuickPickCustomOverride
|
@@ -0,0 +1 @@
|
|
1
|
+
The customQuickPickDates/custom_quick_pick_dates prop allows for an override boolean. The override allows for the user to completely override the quick pick dates that ship with the component. Default of `override` is set to true. If you would like to simply append your dates to the default quick pick dates, set this prop to false explicitly.
|
@@ -10,6 +10,8 @@ examples:
|
|
10
10
|
- date_picker_range: Range
|
11
11
|
- date_picker_quick_pick_rails: Range (Quick Pick)
|
12
12
|
- date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
|
13
|
+
- date_picker_quick_pick_custom: Custom Quick Pick Dates
|
14
|
+
- date_picker_quick_pick_custom_override: Custom Quick Pick Dates (append to defaults)
|
13
15
|
- date_picker_format: Format
|
14
16
|
- date_picker_disabled: Disabled Dates
|
15
17
|
- date_picker_min_max: Min Max
|
@@ -37,6 +39,8 @@ examples:
|
|
37
39
|
- date_picker_range: Range
|
38
40
|
- date_picker_quick_pick_react: Range (Quick Pick)
|
39
41
|
- date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
|
42
|
+
- date_picker_quick_pick_custom: Custom Quick Pick Dates
|
43
|
+
- date_picker_quick_pick_custom_override: Custom Quick Pick Dates (append to defaults)
|
40
44
|
- date_picker_format: Format
|
41
45
|
- date_picker_disabled: Disabled Dates
|
42
46
|
- date_picker_min_max: Min Max
|
@@ -22,3 +22,5 @@ export { default as DatePickerAllowInput } from './_date_picker_allow_input'
|
|
22
22
|
export { default as DatePickerQuickPickReact } from './_date_picker_quick_pick_react'
|
23
23
|
export { default as DatePickerQuickPickRangeLimit } from './_date_picker_quick_pick_range_limit'
|
24
24
|
export { default as DatePickerOnClose } from './_date_picker_on_close.jsx'
|
25
|
+
export { default as DatePickerQuickPickCustom } from './_date_picker_quick_pick_custom'
|
26
|
+
export { default as DatePickerQuickPickCustomOverride } from './_date_picker_quick_pick_custom_override'
|
@@ -1,11 +1,13 @@
|
|
1
|
-
<%= pb_rails("star_rating"
|
1
|
+
<%= pb_rails("star_rating") %>
|
2
2
|
|
3
|
-
|
3
|
+
<br>
|
4
4
|
|
5
|
-
<%= pb_rails("star_rating", props: { rating:
|
5
|
+
<%= pb_rails("star_rating", props: { rating: 3 }) %>
|
6
6
|
|
7
|
-
|
7
|
+
<br>
|
8
8
|
|
9
|
-
<%= pb_rails("star_rating", props: { rating:
|
9
|
+
<%= pb_rails("star_rating", props: { rating: 1.5 }) %>
|
10
10
|
|
11
|
-
|
11
|
+
<br>
|
12
|
+
|
13
|
+
<%= pb_rails("star_rating", props: { rating: 5 }) %>
|
@@ -4,38 +4,25 @@ import StarRating from '../_star_rating'
|
|
4
4
|
|
5
5
|
const StarRatingDefault = (props) => (
|
6
6
|
<>
|
7
|
-
<StarRating
|
8
|
-
paddingBottom="xs"
|
9
|
-
{...props}
|
10
|
-
/>
|
7
|
+
<StarRating />
|
11
8
|
|
9
|
+
<br />
|
12
10
|
|
13
11
|
<StarRating
|
14
|
-
|
15
|
-
rating={0.9}
|
12
|
+
rating={3}
|
16
13
|
{...props}
|
17
14
|
/>
|
18
15
|
|
19
|
-
<
|
20
|
-
paddingBottom="xs"
|
21
|
-
rating={1.5}
|
22
|
-
{...props}
|
23
|
-
/>
|
16
|
+
<br />
|
24
17
|
|
25
18
|
<StarRating
|
26
|
-
|
27
|
-
rating={3}
|
19
|
+
rating={1.5}
|
28
20
|
{...props}
|
29
21
|
/>
|
30
22
|
|
31
|
-
<
|
32
|
-
paddingBottom="xs"
|
33
|
-
rating={4.2}
|
34
|
-
{...props}
|
35
|
-
/>
|
23
|
+
<br />
|
36
24
|
|
37
25
|
<StarRating
|
38
|
-
paddingBottom="xs"
|
39
26
|
rating={5}
|
40
27
|
{...props}
|
41
28
|
/>
|
@@ -1,3 +1 @@
|
|
1
|
-
<%= pb_rails("star_rating", props: { rating: 3,
|
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" }) %>
|
1
|
+
<%= pb_rails("star_rating", props: { rating: 3.5, hide_rating: true }) %>
|
@@ -3,30 +3,13 @@ import React from 'react'
|
|
3
3
|
import StarRating from '../_star_rating'
|
4
4
|
|
5
5
|
const StarRatingHide = (props) => (
|
6
|
-
<>
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
<StarRating
|
8
|
+
hideRating
|
9
|
+
rating={3.5}
|
10
|
+
{...props}
|
11
|
+
/>
|
13
12
|
|
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
|
-
</>
|
30
13
|
)
|
31
14
|
|
32
15
|
export default StarRatingHide
|
@@ -1,16 +1,9 @@
|
|
1
1
|
examples:
|
2
|
+
|
2
3
|
rails:
|
3
|
-
|
4
|
-
|
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
|
4
|
+
- star_rating_default: Default
|
5
|
+
- star_rating_hide: Hide Rating Value
|
9
6
|
|
10
7
|
react:
|
11
|
-
|
12
|
-
|
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
|
8
|
+
- star_rating_default: Default
|
9
|
+
- star_rating_hide: Hide Rating Value
|
@@ -1,11 +1,3 @@
|
|
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
|
-
|
7
3
|
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'
|