playbook_ui 14.7.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4523 → 14.7.0.pre.alpha.spacingquickchange4482
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/date_picker_helper.ts +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +1 -17
- data/app/pb_kits/playbook/pb_drawer/_drawer.scss +175 -88
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +47 -79
- data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +16 -20
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +12 -63
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +1 -43
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +2 -6
- data/app/pb_kits/playbook/pb_timeline/docs/example.yml +3 -5
- data/app/pb_kits/playbook/pb_timeline/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_timeline/timeline.rb +1 -11
- data/app/pb_kits/playbook/pb_timeline/timeline.test.js +4 -4
- data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -36
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
- data/app/pb_kits/playbook/utilities/_hover.scss +27 -40
- data/app/pb_kits/playbook/utilities/globalProps.ts +3 -5
- data/dist/chunks/_typeahead-DhLic2Fe.js +22 -0
- data/dist/chunks/_weekday_stacked-Mx8TYP5I.js +45 -0
- data/dist/chunks/{lib-GRGYd9YR.js → lib-D-mTv-kp.js} +1 -1
- data/dist/chunks/{pb_form_validation-CS6rgdtE.js → pb_form_validation-BkWGwJsl.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/forms/builder/typeahead_field.rb +0 -13
- data/lib/playbook/hover.rb +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +6 -13
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.html.erb +0 -42
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.jsx +0 -44
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.md +0 -1
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.html.erb +0 -94
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.jsx +0 -180
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.md +0 -1
- data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +0 -79
- data/dist/chunks/_typeahead-CA5rhmXa.js +0 -22
- data/dist/chunks/_weekday_stacked-9SqFhGPG.js +0 -45
@@ -5,19 +5,6 @@ module Playbook
|
|
5
5
|
class Builder
|
6
6
|
def typeahead(name, _options = {}, _html_options = {}, props: {})
|
7
7
|
props[:name] = name
|
8
|
-
|
9
|
-
input_id = "#{name}_input"
|
10
|
-
props[:input_options] ||= {}
|
11
|
-
props[:input_options][:id] ||= input_id
|
12
|
-
|
13
|
-
props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
|
14
|
-
|
15
|
-
if props[:validation]
|
16
|
-
validation_message = props[:validation][:message]
|
17
|
-
props[:input_options][:data] ||= {}
|
18
|
-
props[:input_options][:data][:validation_message] = validation_message
|
19
|
-
end
|
20
|
-
|
21
8
|
@template.pb_rails("typeahead", props: props)
|
22
9
|
end
|
23
10
|
end
|
data/lib/playbook/hover.rb
CHANGED
@@ -50,7 +50,7 @@ module Playbook
|
|
50
50
|
if responsive
|
51
51
|
value.each do |key, val|
|
52
52
|
if %i[background color].include?(key)
|
53
|
-
css += "#{prefix}_#{key}
|
53
|
+
css += "#{prefix}_#{key}_#{val} " if hover_attributes.include?(key.to_s)
|
54
54
|
elsif hover_attributes.include?(key.to_s) && send("hover_#{key}_values").include?(val.to_s)
|
55
55
|
css += "#{prefix}_#{key}_#{val} "
|
56
56
|
end
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.7.0.pre.alpha.
|
4
|
+
version: 14.7.0.pre.alpha.spacingquickchange4482
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-11-
|
12
|
+
date: 2024-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -881,9 +881,6 @@ files:
|
|
881
881
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb
|
882
882
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.jsx
|
883
883
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.md
|
884
|
-
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.html.erb
|
885
|
-
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.jsx
|
886
|
-
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.md
|
887
884
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.html.erb
|
888
885
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.md
|
889
886
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.html.erb
|
@@ -2785,9 +2782,6 @@ files:
|
|
2785
2782
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.html.erb
|
2786
2783
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx
|
2787
2784
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md
|
2788
|
-
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.html.erb
|
2789
|
-
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.jsx
|
2790
|
-
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.md
|
2791
2785
|
- app/pb_kits/playbook/pb_timeline/docs/example.yml
|
2792
2786
|
- app/pb_kits/playbook/pb_timeline/docs/index.js
|
2793
2787
|
- app/pb_kits/playbook/pb_timeline/item.html.erb
|
@@ -3163,18 +3157,17 @@ files:
|
|
3163
3157
|
- app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
|
3164
3158
|
- app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js
|
3165
3159
|
- app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js
|
3166
|
-
- app/pb_kits/playbook/utilities/test/globalProps/hover.test.js
|
3167
3160
|
- app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js
|
3168
3161
|
- app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js
|
3169
3162
|
- app/pb_kits/playbook/utilities/test/globalProps/order.test.js
|
3170
3163
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3171
3164
|
- app/pb_kits/playbook/utilities/text.ts
|
3172
3165
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3173
|
-
- dist/chunks/_typeahead-
|
3174
|
-
- dist/chunks/_weekday_stacked-
|
3166
|
+
- dist/chunks/_typeahead-DhLic2Fe.js
|
3167
|
+
- dist/chunks/_weekday_stacked-Mx8TYP5I.js
|
3175
3168
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3176
|
-
- dist/chunks/lib-
|
3177
|
-
- dist/chunks/pb_form_validation-
|
3169
|
+
- dist/chunks/lib-D-mTv-kp.js
|
3170
|
+
- dist/chunks/pb_form_validation-BkWGwJsl.js
|
3178
3171
|
- dist/chunks/vendor.js
|
3179
3172
|
- dist/menu.yml
|
3180
3173
|
- dist/playbook-doc.js
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<%= pb_rails("date_picker", props: {
|
2
|
-
allow_input: true,
|
3
|
-
default_date: "This month",
|
4
|
-
end_date_id: "quick-pick-end-date",
|
5
|
-
end_date_name: "quick-pick-end-date",
|
6
|
-
mode: "range",
|
7
|
-
picker_id: "quick-pick-default-date",
|
8
|
-
placeholder: "mm/dd/yyyy to mm/dd/yyyy",
|
9
|
-
selection_type: "quickpick",
|
10
|
-
start_date_id: "quick-pick-start-date",
|
11
|
-
start_date_name: "quick-pick-start-date"
|
12
|
-
}) %>
|
13
|
-
|
14
|
-
<%= pb_rails("date_picker", props: {
|
15
|
-
allow_input: true,
|
16
|
-
custom_quick_pick_dates: {
|
17
|
-
dates: [
|
18
|
-
{
|
19
|
-
label: "Last 15 months",
|
20
|
-
value: {
|
21
|
-
timePeriod: "months",
|
22
|
-
amount: 15,
|
23
|
-
},
|
24
|
-
},
|
25
|
-
{
|
26
|
-
label: "First Week of June 2022",
|
27
|
-
value: ["06/01/2022", "06/07/2022"],
|
28
|
-
},
|
29
|
-
],
|
30
|
-
},
|
31
|
-
default_date: "First Week of June 2022",
|
32
|
-
end_date_id: "quick-pick-end-date",
|
33
|
-
end_date_name: "quick-pick-end-date",
|
34
|
-
label: "Custom Date Picker",
|
35
|
-
mode: "range",
|
36
|
-
picker_id: "custom-quick-pick-default-date",
|
37
|
-
placeholder: "mm/dd/yyyy to mm/dd/yyyy",
|
38
|
-
selection_type: "quickpick",
|
39
|
-
start_date_id: "quick-pick-start-date",
|
40
|
-
start_date_name: "quick-pick-start-date"
|
41
|
-
}) %>
|
42
|
-
|
@@ -1,44 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import DatePicker from "../_date_picker"
|
3
|
-
|
4
|
-
const DatePickerQuickPickDefaultDate = (props) => (
|
5
|
-
<>
|
6
|
-
<DatePicker
|
7
|
-
allowInput
|
8
|
-
defaultDate="This month"
|
9
|
-
mode="range"
|
10
|
-
pickerId="quick-pick-default-date"
|
11
|
-
placeholder="mm/dd/yyyy to mm/dd/yyyy"
|
12
|
-
selectionType="quickpick"
|
13
|
-
{...props}
|
14
|
-
/>
|
15
|
-
|
16
|
-
<DatePicker
|
17
|
-
allowInput
|
18
|
-
customQuickPickDates={{
|
19
|
-
dates: [
|
20
|
-
{
|
21
|
-
label: "Last 15 months",
|
22
|
-
value: {
|
23
|
-
timePeriod: "months",
|
24
|
-
amount: 15,
|
25
|
-
},
|
26
|
-
},
|
27
|
-
{
|
28
|
-
label: "First Week of June 2022",
|
29
|
-
value: ["06/01/2022", "06/07/2022"],
|
30
|
-
},
|
31
|
-
],
|
32
|
-
}}
|
33
|
-
defaultDate="First Week of June 2022"
|
34
|
-
label="Custom Date Picker"
|
35
|
-
mode="range"
|
36
|
-
pickerId="custom-quick-pick-default-date"
|
37
|
-
placeholder="mm/dd/yyyy to mm/dd/yyyy"
|
38
|
-
selectionType="quickpick"
|
39
|
-
{...props}
|
40
|
-
/>
|
41
|
-
</>
|
42
|
-
)
|
43
|
-
|
44
|
-
export default DatePickerQuickPickDefaultDate
|
@@ -1 +0,0 @@
|
|
1
|
-
To set a default value using Quick Pick, use the `defaultDate` or `default_date` prop. This prop should match one of the labels displayed in the UI of the dropdown menu.
|
@@ -1,94 +0,0 @@
|
|
1
|
-
<%= pb_rails("flex", props: { justify: "evenly" }) do %>
|
2
|
-
<%= pb_rails("flex/flex_item") do %>
|
3
|
-
<%= pb_rails("timeline", props: {orientation: "vertical", gap: "xs"}) do %>
|
4
|
-
<%= pb_rails("timeline/item", props: {icon: "user", icon_color: "royal"}) do %>
|
5
|
-
<%= pb_rails("body", props: {
|
6
|
-
text: "Conversation started",
|
7
|
-
color: "light"
|
8
|
-
}) %>
|
9
|
-
<% end %>
|
10
|
-
<%= pb_rails("timeline/item", props: {icon: "check", icon_color: "teal", line_style: "dotted"}) do %>
|
11
|
-
<%= pb_rails("body", props: {
|
12
|
-
text: "Trip #12422",
|
13
|
-
color: "light"
|
14
|
-
}) %>
|
15
|
-
<% end %>
|
16
|
-
<%= pb_rails("timeline/item", props: {icon: "credit-card", icon_color: "red"}) do %>
|
17
|
-
<%= pb_rails("body", props: {
|
18
|
-
text: "Refund issue #12422",
|
19
|
-
color: "light"
|
20
|
-
}) %>
|
21
|
-
<% end %>
|
22
|
-
<% end %>
|
23
|
-
<% end %>
|
24
|
-
|
25
|
-
<%= pb_rails("flex/flex_item") do %>
|
26
|
-
<%= pb_rails("timeline", props: {orientation: "vertical", gap: "sm"}) do %>
|
27
|
-
<%= pb_rails("timeline/item", props: {icon: "user", icon_color: "royal"}) do %>
|
28
|
-
<%= pb_rails("body", props: {
|
29
|
-
text: "Conversation started",
|
30
|
-
color: "light"
|
31
|
-
}) %>
|
32
|
-
<% end %>
|
33
|
-
<%= pb_rails("timeline/item", props: {icon: "check", icon_color: "teal", line_style: "dotted"}) do %>
|
34
|
-
<%= pb_rails("body", props: {
|
35
|
-
text: "Trip #12422",
|
36
|
-
color: "light"
|
37
|
-
}) %>
|
38
|
-
<% end %>
|
39
|
-
<%= pb_rails("timeline/item", props: {icon: "credit-card", icon_color: "red"}) do %>
|
40
|
-
<%= pb_rails("body", props: {
|
41
|
-
text: "Refund issue #12422",
|
42
|
-
color: "light"
|
43
|
-
}) %>
|
44
|
-
<% end %>
|
45
|
-
<% end %>
|
46
|
-
<% end %>
|
47
|
-
|
48
|
-
<%= pb_rails("flex/flex_item") do %>
|
49
|
-
<%= pb_rails("timeline", props: {orientation: "vertical", gap: "md"}) do %>
|
50
|
-
<%= pb_rails("timeline/item", props: {icon: "user", icon_color: "royal"}) do %>
|
51
|
-
<%= pb_rails("body", props: {
|
52
|
-
text: "Conversation started",
|
53
|
-
color: "light"
|
54
|
-
}) %>
|
55
|
-
<% end %>
|
56
|
-
<%= pb_rails("timeline/item", props: {icon: "check", icon_color: "teal", line_style: "dotted"}) do %>
|
57
|
-
<%= pb_rails("body", props: {
|
58
|
-
text: "Trip #12422",
|
59
|
-
color: "light"
|
60
|
-
}) %>
|
61
|
-
<% end %>
|
62
|
-
<%= pb_rails("timeline/item", props: {icon: "credit-card", icon_color: "red"}) do %>
|
63
|
-
<%= pb_rails("body", props: {
|
64
|
-
text: "Refund issue #12422",
|
65
|
-
color: "light"
|
66
|
-
}) %>
|
67
|
-
<% end %>
|
68
|
-
<% end %>
|
69
|
-
<% end %>
|
70
|
-
|
71
|
-
<%= pb_rails("flex/flex_item") do %>
|
72
|
-
<%= pb_rails("timeline", props: {orientation: "vertical", gap: "lg"}) do %>
|
73
|
-
<%= pb_rails("timeline/item", props: {icon: "user", icon_color: "royal"}) do %>
|
74
|
-
<%= pb_rails("body", props: {
|
75
|
-
text: "Conversation started",
|
76
|
-
color: "light"
|
77
|
-
}) %>
|
78
|
-
<% end %>
|
79
|
-
<%= pb_rails("timeline/item", props: {icon: "check", icon_color: "teal", line_style: "dotted"}) do %>
|
80
|
-
<%= pb_rails("body", props: {
|
81
|
-
text: "Trip #12422",
|
82
|
-
color: "light"
|
83
|
-
}) %>
|
84
|
-
<% end %>
|
85
|
-
<%= pb_rails("timeline/item", props: {icon: "credit-card", icon_color: "red"}) do %>
|
86
|
-
<%= pb_rails("body", props: {
|
87
|
-
text: "Refund issue #12422",
|
88
|
-
color: "light"
|
89
|
-
}) %>
|
90
|
-
<% end %>
|
91
|
-
<% end %>
|
92
|
-
<% end %>
|
93
|
-
<% end %>
|
94
|
-
|
@@ -1,180 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
import Timeline from '../_timeline'
|
4
|
-
import Flex from "../../pb_flex/_flex"
|
5
|
-
import FlexItem from "../../pb_flex/_flex_item"
|
6
|
-
import Body from '../../pb_body/_body'
|
7
|
-
|
8
|
-
const TimelineWithGap = (props) => (
|
9
|
-
<div>
|
10
|
-
<Flex justify="evenly">
|
11
|
-
<FlexItem>
|
12
|
-
<Timeline
|
13
|
-
gap="xs"
|
14
|
-
orientation="vertical"
|
15
|
-
>
|
16
|
-
<Timeline.Item
|
17
|
-
icon="user"
|
18
|
-
iconColor="royal"
|
19
|
-
{...props}
|
20
|
-
>
|
21
|
-
<Body
|
22
|
-
color="light"
|
23
|
-
text="Conversation started"
|
24
|
-
{...props}
|
25
|
-
/>
|
26
|
-
</Timeline.Item>
|
27
|
-
<Timeline.Item
|
28
|
-
icon="check"
|
29
|
-
iconColor="teal"
|
30
|
-
lineStyle="dotted"
|
31
|
-
{...props}
|
32
|
-
>
|
33
|
-
<Body
|
34
|
-
color="light"
|
35
|
-
text="Trip #12422"
|
36
|
-
{...props}
|
37
|
-
/>
|
38
|
-
</Timeline.Item>
|
39
|
-
<Timeline.Item
|
40
|
-
icon="credit-card"
|
41
|
-
iconColor="red"
|
42
|
-
{...props}
|
43
|
-
>
|
44
|
-
<Body
|
45
|
-
color="light"
|
46
|
-
text="Refund issue #12422"
|
47
|
-
{...props}
|
48
|
-
/>
|
49
|
-
</Timeline.Item>
|
50
|
-
</Timeline>
|
51
|
-
</FlexItem>
|
52
|
-
<FlexItem>
|
53
|
-
<Timeline
|
54
|
-
gap="sm"
|
55
|
-
orientation="vertical"
|
56
|
-
>
|
57
|
-
<Timeline.Item
|
58
|
-
icon="user"
|
59
|
-
iconColor="royal"
|
60
|
-
{...props}
|
61
|
-
>
|
62
|
-
<Body
|
63
|
-
color="light"
|
64
|
-
text="Conversation started"
|
65
|
-
{...props}
|
66
|
-
/>
|
67
|
-
</Timeline.Item>
|
68
|
-
<Timeline.Item
|
69
|
-
icon="check"
|
70
|
-
iconColor="teal"
|
71
|
-
lineStyle="dotted"
|
72
|
-
{...props}
|
73
|
-
>
|
74
|
-
<Body
|
75
|
-
color="light"
|
76
|
-
text="Trip #12422"
|
77
|
-
{...props}
|
78
|
-
/>
|
79
|
-
</Timeline.Item>
|
80
|
-
<Timeline.Item
|
81
|
-
icon="credit-card"
|
82
|
-
iconColor="red"
|
83
|
-
{...props}
|
84
|
-
>
|
85
|
-
<Body
|
86
|
-
color="light"
|
87
|
-
text="Refund issue #12422"
|
88
|
-
{...props}
|
89
|
-
/>
|
90
|
-
</Timeline.Item>
|
91
|
-
</Timeline>
|
92
|
-
</FlexItem>
|
93
|
-
<FlexItem>
|
94
|
-
<Timeline
|
95
|
-
gap="md"
|
96
|
-
orientation="vertical"
|
97
|
-
>
|
98
|
-
<Timeline.Item
|
99
|
-
icon="user"
|
100
|
-
iconColor="royal"
|
101
|
-
{...props}
|
102
|
-
>
|
103
|
-
<Body
|
104
|
-
color="light"
|
105
|
-
text="Conversation started"
|
106
|
-
{...props}
|
107
|
-
/>
|
108
|
-
</Timeline.Item>
|
109
|
-
<Timeline.Item
|
110
|
-
icon="check"
|
111
|
-
iconColor="teal"
|
112
|
-
lineStyle="dotted"
|
113
|
-
{...props}
|
114
|
-
>
|
115
|
-
<Body
|
116
|
-
color="light"
|
117
|
-
text="Trip #12422"
|
118
|
-
{...props}
|
119
|
-
/>
|
120
|
-
</Timeline.Item>
|
121
|
-
<Timeline.Item
|
122
|
-
icon="credit-card"
|
123
|
-
iconColor="red"
|
124
|
-
lineStyle="dotted"
|
125
|
-
{...props}
|
126
|
-
>
|
127
|
-
<Body
|
128
|
-
color="light"
|
129
|
-
text="Refund issue #12422"
|
130
|
-
{...props}
|
131
|
-
/>
|
132
|
-
</Timeline.Item>
|
133
|
-
</Timeline>
|
134
|
-
</FlexItem>
|
135
|
-
<FlexItem>
|
136
|
-
<Timeline
|
137
|
-
gap="lg"
|
138
|
-
orientation="vertical"
|
139
|
-
>
|
140
|
-
<Timeline.Item
|
141
|
-
icon="user"
|
142
|
-
iconColor="royal"
|
143
|
-
{...props}
|
144
|
-
>
|
145
|
-
<Body
|
146
|
-
color="light"
|
147
|
-
text="Conversation started"
|
148
|
-
{...props}
|
149
|
-
/>
|
150
|
-
</Timeline.Item>
|
151
|
-
<Timeline.Item
|
152
|
-
icon="check"
|
153
|
-
iconColor="teal"
|
154
|
-
lineStyle="dotted"
|
155
|
-
{...props}
|
156
|
-
>
|
157
|
-
<Body
|
158
|
-
color="light"
|
159
|
-
text="Trip #12422"
|
160
|
-
{...props}
|
161
|
-
/>
|
162
|
-
</Timeline.Item>
|
163
|
-
<Timeline.Item
|
164
|
-
icon="credit-card"
|
165
|
-
iconColor="red"
|
166
|
-
{...props}
|
167
|
-
>
|
168
|
-
<Body
|
169
|
-
color="light"
|
170
|
-
text="Refund issue #12422"
|
171
|
-
{...props}
|
172
|
-
/>
|
173
|
-
</Timeline.Item>
|
174
|
-
</Timeline>
|
175
|
-
</FlexItem>
|
176
|
-
</Flex>
|
177
|
-
</div>
|
178
|
-
)
|
179
|
-
|
180
|
-
export default TimelineWithGap
|
@@ -1 +0,0 @@
|
|
1
|
-
Use the optional `gap` prop to render the timeline kit with adjusted spacing between nodes. The `gap` prop will only work when utilized with a vertical timeline. Horizontal timelines will show no difference in spacing.
|
@@ -1,79 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { render, screen } from '../../test-utils';
|
3
|
-
import Body from '../../../pb_body/_body';
|
4
|
-
|
5
|
-
const testSubject = 'body';
|
6
|
-
|
7
|
-
test('Hover Props: returns proper class name', () => {
|
8
|
-
const testIdColor = `${testSubject}-hover-color-red`;
|
9
|
-
render(
|
10
|
-
<Body
|
11
|
-
data={{ testid: testIdColor }}
|
12
|
-
hover={{ color: 'red' }}
|
13
|
-
text="Hi"
|
14
|
-
/>
|
15
|
-
);
|
16
|
-
|
17
|
-
let kit = screen.getByTestId(testIdColor);
|
18
|
-
let expectedClassName = `hover_color-red`;
|
19
|
-
expect(kit).toHaveClass(expectedClassName);
|
20
|
-
|
21
|
-
const testIdBackground = `${testSubject}-hover-background-blue`;
|
22
|
-
render(
|
23
|
-
<Body
|
24
|
-
data={{ testid: testIdBackground }}
|
25
|
-
hover={{ background: 'blue' }}
|
26
|
-
text="Hi"
|
27
|
-
/>
|
28
|
-
);
|
29
|
-
|
30
|
-
kit = screen.getByTestId(testIdBackground);
|
31
|
-
expectedClassName = `hover_background-blue`;
|
32
|
-
expect(kit).toHaveClass(expectedClassName);
|
33
|
-
|
34
|
-
const testIdShadow = `${testSubject}-hover-shadow-deep`;
|
35
|
-
render(
|
36
|
-
<Body
|
37
|
-
data={{ testid: testIdShadow }}
|
38
|
-
hover={{ shadow: 'deep' }}
|
39
|
-
text="Hi"
|
40
|
-
/>
|
41
|
-
);
|
42
|
-
|
43
|
-
kit = screen.getByTestId(testIdShadow);
|
44
|
-
expectedClassName = `hover_shadow_deep`;
|
45
|
-
expect(kit).toHaveClass(expectedClassName);
|
46
|
-
|
47
|
-
const testIdScale = `${testSubject}-hover-scale`;
|
48
|
-
render(
|
49
|
-
<Body
|
50
|
-
data={{ testid: testIdScale }}
|
51
|
-
hover={{ scale: 'xl' }}
|
52
|
-
text="Test"
|
53
|
-
/>
|
54
|
-
);
|
55
|
-
|
56
|
-
kit = screen.getByTestId(testIdScale);
|
57
|
-
expectedClassName = `hover_scale_xl`;
|
58
|
-
expect(kit).toHaveClass(expectedClassName);
|
59
|
-
|
60
|
-
const testIdMultiple = `${testSubject}-hover-multiple`;
|
61
|
-
render(
|
62
|
-
<Body
|
63
|
-
data={{ testid: testIdMultiple }}
|
64
|
-
hover={{
|
65
|
-
color: 'green',
|
66
|
-
background: 'error',
|
67
|
-
shadow: 'deeper',
|
68
|
-
scale: 'xl',
|
69
|
-
}}
|
70
|
-
text="Hi"
|
71
|
-
/>
|
72
|
-
);
|
73
|
-
|
74
|
-
kit = screen.getByTestId(testIdMultiple);
|
75
|
-
expect(kit).toHaveClass('hover_color-green');
|
76
|
-
expect(kit).toHaveClass('hover_background-error');
|
77
|
-
expect(kit).toHaveClass('hover_shadow_deeper');
|
78
|
-
expect(kit).toHaveClass('hover_scale_xl');
|
79
|
-
});
|