playbook_ui 2.9.7 → 2.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/app/assets/images/pb.logo.svg +14 -14
- data/app/pb_kits/playbook/_playbook.scss +6 -6
- data/app/pb_kits/playbook/index.js +11 -10
- data/app/pb_kits/playbook/kits/pb_nav.js +4 -0
- data/app/pb_kits/playbook/kits/pb_text_input.js +4 -0
- data/app/pb_kits/playbook/packs/examples.js +4 -4
- data/app/pb_kits/playbook/packs/kits.js +2 -2
- data/app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss +0 -1
- data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +1 -1
- data/app/pb_kits/playbook/pb_badge/_badge.jsx +5 -2
- data/app/pb_kits/playbook/pb_badge/_badge.scss +19 -7
- data/app/pb_kits/playbook/pb_badge/badge.rb +6 -1
- data/app/pb_kits/playbook/pb_badge/docs/_badge_dark.html.erb +124 -0
- data/app/pb_kits/playbook/pb_badge/docs/_badge_dark.jsx +82 -0
- data/app/pb_kits/playbook/pb_badge/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_badge/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_button/_button.scss +15 -0
- data/app/pb_kits/playbook/pb_button/_button_mixins.scss +37 -3
- data/app/pb_kits/playbook/pb_button/button.rb +7 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_default_dark.html.erb +22 -4
- data/app/pb_kits/playbook/pb_button/docs/_button_default_dark.jsx +6 -1
- data/app/pb_kits/playbook/pb_caption/_caption.jsx +13 -9
- data/app/pb_kits/playbook/pb_caption/_caption.scss +4 -0
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +11 -7
- data/app/pb_kits/playbook/pb_caption/caption.rb +4 -5
- data/app/pb_kits/playbook/pb_caption/docs/_caption_dark.html.erb +2 -1
- data/app/pb_kits/playbook/pb_caption/docs/_caption_dark.jsx +2 -1
- data/app/pb_kits/playbook/pb_caption/docs/_caption_light.html.erb +2 -1
- data/app/pb_kits/playbook/pb_caption/docs/_caption_light.jsx +2 -1
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +3 -3
- data/app/pb_kits/playbook/pb_contact/_contact.html.erb +2 -1
- data/app/pb_kits/playbook/pb_contact/_contact.jsx +10 -4
- data/app/pb_kits/playbook/pb_contact/contact.rb +4 -9
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb +1 -4
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +0 -3
- data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb +16 -0
- data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx +25 -0
- data/app/pb_kits/playbook/pb_contact/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_contact/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date/_date.html.erb +10 -2
- data/app/pb_kits/playbook/pb_date/date.rb +18 -90
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.html.erb +3 -3
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb +15 -54
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.html.erb +2 -2
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.jsx +13 -11
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.scss +3 -1
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_dark.html.erb +9 -0
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_dark.jsx +31 -0
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.jsx +2 -2
- data/app/pb_kits/playbook/pb_hashtag/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_hashtag/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_hashtag/hashtag.rb +6 -1
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.html.erb +12 -6
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +10 -5
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.scss +0 -20
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_dark.jsx +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified.jsx +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +3 -3
- data/app/pb_kits/playbook/pb_label_pill/docs/_label_pill_default.html.erb +9 -3
- data/app/pb_kits/playbook/pb_label_pill/label_pill.rb +1 -1
- data/app/pb_kits/playbook/pb_nav/_horizontal_nav.scss +67 -0
- data/app/pb_kits/playbook/{pb_vertical_nav → pb_nav}/_item.html.erb +2 -2
- data/app/pb_kits/playbook/{pb_vertical_nav → pb_nav}/_item.jsx +7 -7
- data/app/pb_kits/playbook/{pb_vertical_nav/_vertical_nav.html.erb → pb_nav/_nav.html.erb} +2 -2
- data/app/pb_kits/playbook/{pb_vertical_nav/_vertical_nav.jsx → pb_nav/_nav.jsx} +7 -7
- data/app/pb_kits/playbook/pb_nav/_nav.scss +6 -0
- data/app/pb_kits/playbook/{pb_vertical_nav → pb_nav}/_vertical_nav.scss +38 -35
- data/app/pb_kits/playbook/pb_nav/docs/_block_nav.html.erb +5 -0
- data/app/pb_kits/playbook/pb_nav/docs/_block_no_title.html.erb +5 -0
- data/app/pb_kits/playbook/pb_nav/docs/_default_nav.html.erb +5 -0
- data/app/pb_kits/playbook/{pb_vertical_nav → pb_nav}/docs/_default_nav.jsx +2 -2
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav.html.erb +5 -0
- data/app/pb_kits/playbook/{pb_vertical_nav → pb_nav}/docs/example.yml +1 -0
- data/app/pb_kits/playbook/{pb_vertical_nav → pb_nav}/docs/index.js +0 -0
- data/app/pb_kits/playbook/{pb_vertical_nav → pb_nav}/item.rb +3 -3
- data/app/pb_kits/playbook/pb_nav/nav.rb +27 -0
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.html.erb +13 -6
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +8 -14
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.scss +1 -0
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_default.html.erb +5 -20
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_default.jsx +2 -17
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_multiple.html.erb +27 -0
- data/app/pb_kits/playbook/pb_person_contact/docs/{_person_contact_single_person.jsx → _person_contact_multiple.jsx} +13 -11
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_detail.html.erb +19 -0
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_detail.jsx +30 -0
- data/app/pb_kits/playbook/pb_person_contact/docs/example.yml +5 -4
- data/app/pb_kits/playbook/pb_person_contact/docs/index.js +2 -2
- data/app/pb_kits/playbook/pb_person_contact/person_contact.rb +10 -1
- data/app/pb_kits/playbook/pb_pill/docs/_pill_default.html.erb +7 -0
- data/app/pb_kits/playbook/pb_pill/docs/_pill_default.jsx +4 -0
- data/app/pb_kits/playbook/pb_pill/pill.rb +1 -1
- data/app/pb_kits/playbook/pb_table/styles/_headers.scss +3 -4
- data/app/pb_kits/playbook/{pb_input/_input.html.erb → pb_text_input/_text_input.html.erb} +2 -2
- data/app/pb_kits/playbook/{pb_input/_input.jsx → pb_text_input/_text_input.jsx} +7 -7
- data/app/pb_kits/playbook/{pb_input/_input.scss → pb_text_input/_text_input.scss} +3 -3
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.html.erb +5 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +16 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/{pb_input/input.rb → pb_text_input/text_input.rb} +4 -4
- data/app/pb_kits/playbook/pb_time/_time.html.erb +32 -2
- data/app/pb_kits/playbook/pb_time/time.rb +15 -116
- data/app/pb_kits/playbook/pb_timestamp/_timestamp-mixins.scss +0 -2
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.html.erb +1 -1
- data/app/pb_kits/playbook/tokens/_colors.scss +18 -22
- data/app/pb_kits/playbook/utilities/_colors.scss +12 -0
- data/app/pb_kits/playbook/utilities/text.js +16 -0
- data/app/views/layouts/playbook/_sidebar.html.slim +10 -11
- data/lib/playbook/version.rb +1 -1
- metadata +39 -29
- data/app/pb_kits/playbook/kits/pb_input.js +0 -4
- data/app/pb_kits/playbook/kits/pb_vertical_nav.js +0 -4
- data/app/pb_kits/playbook/pb_input/docs/_input_default.html.erb +0 -5
- data/app/pb_kits/playbook/pb_input/docs/_input_default.jsx +0 -16
- data/app/pb_kits/playbook/pb_input/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_single_person.html.erb +0 -24
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_three_people.html.erb +0 -16
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_three_people.jsx +0 -33
- data/app/pb_kits/playbook/pb_vertical_nav/docs/_block_nav.html.erb +0 -5
- data/app/pb_kits/playbook/pb_vertical_nav/docs/_block_no_title.html.erb +0 -5
- data/app/pb_kits/playbook/pb_vertical_nav/docs/_default_nav.html.erb +0 -5
- data/app/pb_kits/playbook/pb_vertical_nav/vertical_nav.rb +0 -19
@@ -0,0 +1,5 @@
|
|
1
|
+
<%= pb_rails("text_input", props: { label: "First Name", placeholder: "Enter first name", value: "Timothy Wenhold" }) %>
|
2
|
+
<%= pb_rails("text_input", props: { label: "Last Name", placeholder: "Enter last name" }) %>
|
3
|
+
<%= pb_rails("text_input", props: { label: "Phone Number", type: "phone", placeholder: "Enter phone number" }) %>
|
4
|
+
<%= pb_rails("text_input", props: { label: "Email Address", type: "email", placeholder: "Enter email address" }) %>
|
5
|
+
<%= pb_rails("text_input", props: { label: "Zip Code", type: "number", placeholder: "Enter zip code" }) %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import {TextInput} from "../../"
|
3
|
+
|
4
|
+
function TextInputDefault() {
|
5
|
+
return (
|
6
|
+
<div>
|
7
|
+
<TextInput label="First Name" placeholder="Enter first name" value="Timothy Wenhold" />
|
8
|
+
<TextInput label="Last Name" placeholder="Enter last name" />
|
9
|
+
<TextInput label="Phone Number" type="phone" placeholder="Enter phone number" />
|
10
|
+
<TextInput label="Email Address" type="email" placeholder="Enter email address" />
|
11
|
+
<TextInput label="Zip Code" type="number" placeholder="Enter zip code" />
|
12
|
+
</div>
|
13
|
+
)
|
14
|
+
}
|
15
|
+
|
16
|
+
export default TextInputDefault
|
@@ -0,0 +1 @@
|
|
1
|
+
export {default as TextInputDefault} from './_text_input_default.jsx';
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Playbook
|
4
|
-
module
|
5
|
-
class
|
4
|
+
module PbTextInput
|
5
|
+
class TextInput
|
6
6
|
include Playbook::Props
|
7
7
|
|
8
|
-
partial "
|
8
|
+
partial "pb_text_input/text_input"
|
9
9
|
|
10
10
|
prop :label
|
11
11
|
prop :name
|
@@ -14,7 +14,7 @@ module Playbook
|
|
14
14
|
prop :type, default: "text"
|
15
15
|
|
16
16
|
def classname
|
17
|
-
generate_classname("
|
17
|
+
generate_classname("pb_text_input_kit")
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -1,6 +1,36 @@
|
|
1
1
|
<%= content_tag(:div,
|
2
2
|
id: object.id,
|
3
3
|
data: object.data,
|
4
|
-
class: object.classname
|
5
|
-
|
4
|
+
class: object.classname) do %>
|
5
|
+
<% if object.size == "lg" %>
|
6
|
+
<%= pb_rails("title", props: { tag: "span", text: object.format_time_string, size: 3 }) %>
|
7
|
+
<%= content_tag(:span) do %>
|
8
|
+
<%= content_tag(:span, class: "pb_time_timezone") do %>
|
9
|
+
<%= object.pb_date_time.to_timezone.upcase %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
<% elsif object.size == "sm" %>
|
13
|
+
<%= pb_rails("body", props: { tag: "span", text: object.format_time_string }) do %>
|
14
|
+
<%= pb_rails("icon", props: { icon: "clock", fixed_width: true }) %>
|
15
|
+
<%= content_tag(:time, datetime: object.pb_date_time.to_iso) do %>
|
16
|
+
<%= content_tag(:span) do %>
|
17
|
+
<%= object.format_time_string %>
|
18
|
+
<%= content_tag(:span, class: "pb_time_timezone") do %>
|
19
|
+
<%= object.pb_date_time.to_timezone.upcase %>
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% else %>
|
25
|
+
<%= pb_rails("body", props: { tag: "span", text: object.format_time_string }) do %>
|
26
|
+
<%= content_tag(:time, datetime: object.pb_date_time.to_iso) do %>
|
27
|
+
<%= content_tag(:span) do %>
|
28
|
+
<%= object.format_time_string %>
|
29
|
+
<%= content_tag(:span, class: "pb_time_timezone") do %>
|
30
|
+
<%= object.pb_date_time.to_timezone.upcase %>
|
31
|
+
<% end %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
6
36
|
<% end %>
|
@@ -2,133 +2,32 @@
|
|
2
2
|
|
3
3
|
module Playbook
|
4
4
|
module PbTime
|
5
|
-
class Time
|
6
|
-
include
|
7
|
-
include ActionView::Context
|
5
|
+
class Time
|
6
|
+
include Playbook::Props
|
8
7
|
|
9
|
-
|
10
|
-
configured_data
|
11
|
-
configured_id
|
12
|
-
configured_size
|
13
|
-
configured_time
|
14
|
-
configured_timestamp
|
15
|
-
configured_timezone].freeze
|
8
|
+
partial "pb_time/time"
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
timestamp: default_configuration,
|
23
|
-
timezone: default_configuration)
|
24
|
-
self.configured_classname = classname
|
25
|
-
self.configured_data = data
|
26
|
-
self.configured_id = id
|
27
|
-
self.configured_size = size
|
28
|
-
self.configured_time = time
|
29
|
-
self.configured_timestamp = timestamp
|
30
|
-
self.configured_timezone = timezone
|
31
|
-
end
|
32
|
-
|
33
|
-
def display_value
|
34
|
-
case size
|
35
|
-
when "lg"
|
36
|
-
display_value_lg
|
37
|
-
when "sm"
|
38
|
-
display_value_sm
|
39
|
-
else
|
40
|
-
display_value_xs
|
41
|
-
end
|
42
|
-
end
|
10
|
+
prop :time, required: true
|
11
|
+
prop :size, type: Playbook::Props::Enum,
|
12
|
+
values: %w[lg sm xs],
|
13
|
+
default: "sm"
|
14
|
+
prop :timezone, default: "America/New_York"
|
43
15
|
|
44
|
-
def
|
45
|
-
|
46
|
-
"pb_time_kit",
|
47
|
-
size,
|
48
|
-
]
|
49
|
-
kit_options.join("_")
|
50
|
-
end
|
51
|
-
|
52
|
-
def to_partial_path
|
53
|
-
"pb_time/time"
|
54
|
-
end
|
55
|
-
|
56
|
-
private
|
57
|
-
|
58
|
-
def timestamp
|
59
|
-
if is_set? configured_time
|
60
|
-
time = configured_time
|
61
|
-
else
|
62
|
-
time = configured_timestamp
|
63
|
-
end
|
64
|
-
Playbook::PbKit::PbDateTime.new(time, timezone_value)
|
65
|
-
end
|
66
|
-
|
67
|
-
def timezone_value
|
68
|
-
default_value(configured_timezone, "America/New_York")
|
16
|
+
def classname
|
17
|
+
generate_classname("pb_time_kit", size)
|
69
18
|
end
|
70
19
|
|
71
20
|
def format_time_string
|
72
|
-
"#{
|
73
|
-
end
|
74
|
-
|
75
|
-
def timezone
|
76
|
-
content_tag(:span, class: "pb_time_timezone") do
|
77
|
-
timestamp.to_timezone.upcase
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def size
|
82
|
-
size_options = %w[lg sm xs]
|
83
|
-
one_of_value(configured_size, size_options, "sm")
|
84
|
-
end
|
85
|
-
|
86
|
-
def icon
|
87
|
-
pb_icon = Playbook::PbIcon::Icon.new(icon: "clock", fixed_width: true)
|
88
|
-
ApplicationController.renderer.render(partial: pb_icon, as: :object)
|
89
|
-
end
|
90
|
-
|
91
|
-
def text
|
92
|
-
content_tag(:time, datetime: timestamp.to_iso) do
|
93
|
-
content_tag(:span) do
|
94
|
-
format_time_string
|
95
|
-
end +
|
96
|
-
timezone
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
def display_value_xs
|
101
|
-
if is_set?(configured_timestamp) || is_set?(configured_time)
|
102
|
-
pb_value = Playbook::PbBody::Body.new(color: "default") do
|
103
|
-
text
|
104
|
-
end
|
105
|
-
ApplicationController.renderer.render(partial: pb_value, as: :object)
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
def display_value_sm
|
110
|
-
if is_set?(configured_timestamp) || is_set?(configured_time)
|
111
|
-
pb_value = Playbook::PbBody::Body.new(color: "default") do
|
112
|
-
icon +
|
113
|
-
text
|
114
|
-
end
|
115
|
-
ApplicationController.renderer.render(partial: pb_value, as: :object)
|
116
|
-
end
|
21
|
+
"#{pb_date_time.to_hour}:#{pb_date_time.to_minutes}#{pb_date_time.to_meridian}"
|
117
22
|
end
|
118
23
|
|
119
|
-
def
|
120
|
-
|
121
|
-
pb_value_lg = Playbook::PbTitle::Title.new(size: 3, text: text)
|
122
|
-
ApplicationController.renderer.render(partial: pb_value_lg, as: :object)
|
123
|
-
end
|
24
|
+
def format_timezone_string
|
25
|
+
"#{pb_date_time.to_timezone}"
|
124
26
|
end
|
125
27
|
|
126
|
-
|
127
|
-
|
128
|
-
def default_configuration
|
129
|
-
DEFAULT
|
28
|
+
def pb_date_time
|
29
|
+
pb_date_time ||= Playbook::PbKit::PbDateTime.new(time, timezone)
|
130
30
|
end
|
131
|
-
attr_accessor(*PROPS)
|
132
31
|
end
|
133
32
|
end
|
134
33
|
end
|
@@ -1,10 +1,11 @@
|
|
1
|
+
@import "./opacity";
|
2
|
+
|
1
3
|
//=====================================
|
2
4
|
// Base colors should not be documented.
|
3
5
|
// Only document color use.
|
4
6
|
|
5
7
|
// Colors -----------------------------
|
6
|
-
$royal: #
|
7
|
-
$blue: #0082FF;
|
8
|
+
$royal: #0056CF;
|
8
9
|
$purple: #9E64E9;
|
9
10
|
$teal: #00C4D7;
|
10
11
|
$red: #FF2229;
|
@@ -13,7 +14,6 @@ $green: #00CA74;
|
|
13
14
|
$orange: #FD804C;
|
14
15
|
$colors: (
|
15
16
|
royal: $royal,
|
16
|
-
blue: $blue,
|
17
17
|
purple: $purple,
|
18
18
|
teal: $teal,
|
19
19
|
red: $red,
|
@@ -40,8 +40,8 @@ $interface_colors: (
|
|
40
40
|
|
41
41
|
// Main colors ------------------------
|
42
42
|
$primary: $royal;
|
43
|
-
$secondary: $
|
44
|
-
$tertiary: $
|
43
|
+
$secondary: $yellow;
|
44
|
+
$tertiary: $purple;
|
45
45
|
$main_colors: (
|
46
46
|
primary: $primary,
|
47
47
|
secondary: $secondary,
|
@@ -51,7 +51,7 @@ $main_colors: (
|
|
51
51
|
|
52
52
|
// Background colors ------------------
|
53
53
|
$bg_light: $silver;
|
54
|
-
$bg_dark:
|
54
|
+
$bg_dark: #172257;
|
55
55
|
$background_colors: (
|
56
56
|
bg_light: $bg_light,
|
57
57
|
bg_dark: $bg_dark
|
@@ -59,12 +59,14 @@ $background_colors: (
|
|
59
59
|
|
60
60
|
// Card colors ------------------
|
61
61
|
$card_light: $white;
|
62
|
-
$card_dark: $
|
62
|
+
$card_dark: rgba($white, $opacity_1);
|
63
63
|
$card_colors: (
|
64
64
|
card_light: $card_light,
|
65
65
|
card_dark: $card_dark
|
66
66
|
);
|
67
67
|
|
68
|
+
$primary-action: $primary;
|
69
|
+
|
68
70
|
// Active colors ----------------------
|
69
71
|
$active_light: #E5F2FF;
|
70
72
|
$active_dark: #144075;
|
@@ -75,7 +77,7 @@ $active_colors: (
|
|
75
77
|
|
76
78
|
// Hover colors -----------------------
|
77
79
|
$hover_light: darken($silver, 5%);
|
78
|
-
$hover_dark:
|
80
|
+
$hover_dark: rgba($white, $opacity_2);
|
79
81
|
$hover_colors: (
|
80
82
|
hover_light: $hover_light,
|
81
83
|
hover_dark: $hover_dark
|
@@ -83,15 +85,15 @@ $hover_colors: (
|
|
83
85
|
|
84
86
|
// Border colors ----------------------
|
85
87
|
$border_light: #E4E8F0;
|
86
|
-
$border_dark:
|
88
|
+
$border_dark: rgba($white, $opacity_1);
|
87
89
|
$border_colors: (
|
88
90
|
border_light: $border_light,
|
89
91
|
border_dark: $border_dark
|
90
92
|
);
|
91
93
|
|
92
94
|
// Shadow colors ----------------------
|
93
|
-
$shadow_light: rgba($
|
94
|
-
$shadow_dark: rgba($slate,
|
95
|
+
$shadow_light: rgba($royal, $opacity_1);
|
96
|
+
$shadow_dark: rgba($slate, $opacity_1);
|
95
97
|
$shadow_colors: (
|
96
98
|
shadow_light: $shadow_light,
|
97
99
|
shadow_dark: $shadow_dark
|
@@ -102,8 +104,8 @@ $text_lt_default: $charcoal;
|
|
102
104
|
$text_lt_light: #919EAB;
|
103
105
|
$text_lt_lighter: $slate;
|
104
106
|
$text_dk_default: $white;
|
105
|
-
$text_dk_light: rgba($white,
|
106
|
-
$text_dk_lighter: rgba($white,
|
107
|
+
$text_dk_light: rgba($white, $opacity_6);
|
108
|
+
$text_dk_lighter: rgba($white, $opacity_4);
|
107
109
|
$text_colors: (
|
108
110
|
text_lt_default: $text_lt_default,
|
109
111
|
text_lt_light: $text_lt_light,
|
@@ -153,22 +155,17 @@ $status_color_text: (
|
|
153
155
|
warning: darken($warning, 10%),
|
154
156
|
error: $error,
|
155
157
|
info: $info,
|
156
|
-
neutral: darken($neutral,
|
158
|
+
neutral: darken($neutral, 15%),
|
159
|
+
primary: lighten($primary, 10%)
|
157
160
|
);
|
158
161
|
|
159
162
|
// Link colors ------------------------
|
160
163
|
$primary_action: $primary;
|
161
|
-
$primary_action_dk: $blue;
|
162
|
-
$secondary_action: $blue;
|
163
|
-
$action_colors: (
|
164
|
-
primary_action: $primary_action,
|
165
|
-
primary_action_dk: $primary_action_dk
|
166
|
-
);
|
167
164
|
|
168
165
|
// Product colors ---------------------
|
169
166
|
$windows: $royal;
|
170
167
|
$siding: $yellow;
|
171
|
-
$doors: $
|
168
|
+
$doors: $red;
|
172
169
|
$solar: $green;
|
173
170
|
$roofs: $teal;
|
174
171
|
$gutters: $purple;
|
@@ -191,7 +188,6 @@ $transparent: transparent;
|
|
191
188
|
}
|
192
189
|
}
|
193
190
|
@include export-colors($product_colors);
|
194
|
-
@include export-colors($action_colors);
|
195
191
|
@include export-colors($status_colors);
|
196
192
|
@include export-colors($data_colors);
|
197
193
|
@include export-colors($shadow_colors);
|
@@ -1,3 +1,15 @@
|
|
1
|
+
@function tint($color, $percentage) {
|
2
|
+
@return mix($white, $color, $percentage);
|
3
|
+
}
|
4
|
+
|
5
|
+
@function shade($color, $percentage) {
|
6
|
+
@return mix($charcoal, $color, $percentage);
|
7
|
+
}
|
8
|
+
|
9
|
+
@function dim($color, $percentage) {
|
10
|
+
@return mix($bg_dark, $color, $percentage);
|
11
|
+
}
|
12
|
+
|
1
13
|
@mixin background-color($colors-list) {
|
2
14
|
@each $name, $color in $colors-list {
|
3
15
|
.#{$name} {
|
@@ -0,0 +1,16 @@
|
|
1
|
+
function titleize(sentence) {
|
2
|
+
if(!sentence.split) return sentence
|
3
|
+
|
4
|
+
const titleizedWord = function(string) {
|
5
|
+
return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase()
|
6
|
+
}
|
7
|
+
|
8
|
+
let result = []
|
9
|
+
sentence.split(' ').forEach(function(w) {
|
10
|
+
result.push(titleizedWord(w))
|
11
|
+
})
|
12
|
+
|
13
|
+
return result.join(' ')
|
14
|
+
}
|
15
|
+
|
16
|
+
export { titleize }
|
@@ -1,29 +1,28 @@
|
|
1
1
|
br
|
2
|
-
= pb_rails("
|
2
|
+
= pb_rails("nav", props: {title: "Principles", link: principles_path}) do
|
3
3
|
- principles_active = (controller_name == 'pages' && action_name == 'principles') ? true : false
|
4
4
|
- guides_active = (controller_name == 'guides' && action_name == 'create_kit') ? true : false
|
5
5
|
- use_nitro_active = (controller_name == 'guides' && action_name == 'use_nitro') ? true : false
|
6
|
-
= pb_rails("
|
7
|
-
//= pb_rails("
|
8
|
-
= pb_rails("
|
6
|
+
= pb_rails("nav/item", props: { text: "Getting Started", link: principles_path, active: principles_active })
|
7
|
+
//= pb_rails("nav/item", props: { text: "Using in Nitro", link: guides_use_in_nitro_path, active: use_nitro_active })
|
8
|
+
= pb_rails("nav/item", props: { text: "Creating Kits", link: guides_path, active: guides_active })
|
9
9
|
|
10
10
|
br
|
11
|
-
= pb_rails("
|
11
|
+
= pb_rails("nav", props: {title: "Kits", link: kits_path}) do
|
12
12
|
- all_active = (controller_name == 'pages' && action_name == 'kits') ? true : false
|
13
|
-
= pb_rails("
|
13
|
+
= pb_rails("nav/item", props: { text: "All", link: kits_path, active: all_active })
|
14
14
|
|
15
15
|
- MENU["kits"].sort.each do |link|
|
16
16
|
- active = !@kit.nil? && @kit == link ? true : false
|
17
|
-
= pb_rails("
|
17
|
+
= pb_rails("nav/item", props: { text: pb_kit_title(link), link: kit_show_path(link), active: active })
|
18
18
|
|
19
19
|
br
|
20
20
|
|
21
|
-
|
22
|
-
= pb_rails("vertical_nav", props: {title: "Tokens", link: utilities_path}) do
|
21
|
+
= pb_rails("nav", props: {title: "Tokens", link: utilities_path}) do
|
23
22
|
- color_active = (controller_name == 'pages' && action_name == 'utilities') ? true : false
|
24
|
-
= pb_rails("
|
23
|
+
= pb_rails("nav/item", props: { text: "Colors", link: utilities_path, active: color_active })
|
25
24
|
- spacing_active = (controller_name == 'pages' && action_name == 'tokens') ? true : false
|
26
|
-
= pb_rails("
|
25
|
+
= pb_rails("nav/item", props: { text: "Spacing", link: tokens_path, active: spacing_active })
|
27
26
|
|
28
27
|
br
|
29
28
|
br
|
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: 2.9.
|
4
|
+
version: 2.9.8
|
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: 2019-11-
|
12
|
+
date: 2019-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -401,7 +401,6 @@ files:
|
|
401
401
|
- app/pb_kits/playbook/kits/pb_icon_circle.js
|
402
402
|
- app/pb_kits/playbook/kits/pb_icon_value.js
|
403
403
|
- app/pb_kits/playbook/kits/pb_image.js
|
404
|
-
- app/pb_kits/playbook/kits/pb_input.js
|
405
404
|
- app/pb_kits/playbook/kits/pb_label_pill.js
|
406
405
|
- app/pb_kits/playbook/kits/pb_label_value.js
|
407
406
|
- app/pb_kits/playbook/kits/pb_layout.js
|
@@ -409,6 +408,7 @@ files:
|
|
409
408
|
- app/pb_kits/playbook/kits/pb_list.js
|
410
409
|
- app/pb_kits/playbook/kits/pb_loading_inline.js
|
411
410
|
- app/pb_kits/playbook/kits/pb_message.js
|
411
|
+
- app/pb_kits/playbook/kits/pb_nav.js
|
412
412
|
- app/pb_kits/playbook/kits/pb_online_status.js
|
413
413
|
- app/pb_kits/playbook/kits/pb_person.js
|
414
414
|
- app/pb_kits/playbook/kits/pb_person_contact.js
|
@@ -420,6 +420,7 @@ files:
|
|
420
420
|
- app/pb_kits/playbook/kits/pb_stat_change.js
|
421
421
|
- app/pb_kits/playbook/kits/pb_stat_value.js
|
422
422
|
- app/pb_kits/playbook/kits/pb_table.js
|
423
|
+
- app/pb_kits/playbook/kits/pb_text_input.js
|
423
424
|
- app/pb_kits/playbook/kits/pb_time.js
|
424
425
|
- app/pb_kits/playbook/kits/pb_timestamp.js
|
425
426
|
- app/pb_kits/playbook/kits/pb_title.js
|
@@ -428,7 +429,6 @@ files:
|
|
428
429
|
- app/pb_kits/playbook/kits/pb_toggle.js
|
429
430
|
- app/pb_kits/playbook/kits/pb_user.js
|
430
431
|
- app/pb_kits/playbook/kits/pb_user_badge.js
|
431
|
-
- app/pb_kits/playbook/kits/pb_vertical_nav.js
|
432
432
|
- app/pb_kits/playbook/packs/application.js
|
433
433
|
- app/pb_kits/playbook/packs/examples.js
|
434
434
|
- app/pb_kits/playbook/packs/kits.js
|
@@ -459,6 +459,8 @@ files:
|
|
459
459
|
- app/pb_kits/playbook/pb_badge/badge.rb
|
460
460
|
- app/pb_kits/playbook/pb_badge/docs/_badge_colors.html.erb
|
461
461
|
- app/pb_kits/playbook/pb_badge/docs/_badge_colors.jsx
|
462
|
+
- app/pb_kits/playbook/pb_badge/docs/_badge_dark.html.erb
|
463
|
+
- app/pb_kits/playbook/pb_badge/docs/_badge_dark.jsx
|
462
464
|
- app/pb_kits/playbook/pb_badge/docs/_badge_default.html.erb
|
463
465
|
- app/pb_kits/playbook/pb_badge/docs/_badge_default.jsx
|
464
466
|
- app/pb_kits/playbook/pb_badge/docs/_badge_rounded.html.erb
|
@@ -557,6 +559,8 @@ files:
|
|
557
559
|
- app/pb_kits/playbook/pb_contact/contact.rb
|
558
560
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb
|
559
561
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx
|
562
|
+
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb
|
563
|
+
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx
|
560
564
|
- app/pb_kits/playbook/pb_contact/docs/example.yml
|
561
565
|
- app/pb_kits/playbook/pb_contact/docs/index.js
|
562
566
|
- app/pb_kits/playbook/pb_currency/_currency.html.erb
|
@@ -628,6 +632,8 @@ files:
|
|
628
632
|
- app/pb_kits/playbook/pb_hashtag/_hashtag.html.erb
|
629
633
|
- app/pb_kits/playbook/pb_hashtag/_hashtag.jsx
|
630
634
|
- app/pb_kits/playbook/pb_hashtag/_hashtag.scss
|
635
|
+
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_dark.html.erb
|
636
|
+
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_dark.jsx
|
631
637
|
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.html.erb
|
632
638
|
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.jsx
|
633
639
|
- app/pb_kits/playbook/pb_hashtag/docs/example.yml
|
@@ -694,14 +700,6 @@ files:
|
|
694
700
|
- app/pb_kits/playbook/pb_image/docs/example.yml
|
695
701
|
- app/pb_kits/playbook/pb_image/docs/index.js
|
696
702
|
- app/pb_kits/playbook/pb_image/image.rb
|
697
|
-
- app/pb_kits/playbook/pb_input/_input.html.erb
|
698
|
-
- app/pb_kits/playbook/pb_input/_input.jsx
|
699
|
-
- app/pb_kits/playbook/pb_input/_input.scss
|
700
|
-
- app/pb_kits/playbook/pb_input/docs/_input_default.html.erb
|
701
|
-
- app/pb_kits/playbook/pb_input/docs/_input_default.jsx
|
702
|
-
- app/pb_kits/playbook/pb_input/docs/example.yml
|
703
|
-
- app/pb_kits/playbook/pb_input/docs/index.js
|
704
|
-
- app/pb_kits/playbook/pb_input/input.rb
|
705
703
|
- app/pb_kits/playbook/pb_kit/base.rb
|
706
704
|
- app/pb_kits/playbook/pb_kit/dateTime.js
|
707
705
|
- app/pb_kits/playbook/pb_kit/pb_date_time.rb
|
@@ -794,6 +792,22 @@ files:
|
|
794
792
|
- app/pb_kits/playbook/pb_message/docs/example.yml
|
795
793
|
- app/pb_kits/playbook/pb_message/docs/index.js
|
796
794
|
- app/pb_kits/playbook/pb_message/message.rb
|
795
|
+
- app/pb_kits/playbook/pb_nav/_horizontal_nav.scss
|
796
|
+
- app/pb_kits/playbook/pb_nav/_item.html.erb
|
797
|
+
- app/pb_kits/playbook/pb_nav/_item.jsx
|
798
|
+
- app/pb_kits/playbook/pb_nav/_nav.html.erb
|
799
|
+
- app/pb_kits/playbook/pb_nav/_nav.jsx
|
800
|
+
- app/pb_kits/playbook/pb_nav/_nav.scss
|
801
|
+
- app/pb_kits/playbook/pb_nav/_vertical_nav.scss
|
802
|
+
- app/pb_kits/playbook/pb_nav/docs/_block_nav.html.erb
|
803
|
+
- app/pb_kits/playbook/pb_nav/docs/_block_no_title.html.erb
|
804
|
+
- app/pb_kits/playbook/pb_nav/docs/_default_nav.html.erb
|
805
|
+
- app/pb_kits/playbook/pb_nav/docs/_default_nav.jsx
|
806
|
+
- app/pb_kits/playbook/pb_nav/docs/_horizontal_nav.html.erb
|
807
|
+
- app/pb_kits/playbook/pb_nav/docs/example.yml
|
808
|
+
- app/pb_kits/playbook/pb_nav/docs/index.js
|
809
|
+
- app/pb_kits/playbook/pb_nav/item.rb
|
810
|
+
- app/pb_kits/playbook/pb_nav/nav.rb
|
797
811
|
- app/pb_kits/playbook/pb_online_status/_online_status.html.erb
|
798
812
|
- app/pb_kits/playbook/pb_online_status/_online_status.jsx
|
799
813
|
- app/pb_kits/playbook/pb_online_status/_online_status.scss
|
@@ -816,10 +830,10 @@ files:
|
|
816
830
|
- app/pb_kits/playbook/pb_person_contact/_person_contact.scss
|
817
831
|
- app/pb_kits/playbook/pb_person_contact/docs/_person_contact_default.html.erb
|
818
832
|
- app/pb_kits/playbook/pb_person_contact/docs/_person_contact_default.jsx
|
819
|
-
- app/pb_kits/playbook/pb_person_contact/docs/
|
820
|
-
- app/pb_kits/playbook/pb_person_contact/docs/
|
821
|
-
- app/pb_kits/playbook/pb_person_contact/docs/
|
822
|
-
- app/pb_kits/playbook/pb_person_contact/docs/
|
833
|
+
- app/pb_kits/playbook/pb_person_contact/docs/_person_contact_multiple.html.erb
|
834
|
+
- app/pb_kits/playbook/pb_person_contact/docs/_person_contact_multiple.jsx
|
835
|
+
- app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_detail.html.erb
|
836
|
+
- app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_detail.jsx
|
823
837
|
- app/pb_kits/playbook/pb_person_contact/docs/example.yml
|
824
838
|
- app/pb_kits/playbook/pb_person_contact/docs/index.js
|
825
839
|
- app/pb_kits/playbook/pb_person_contact/person_contact.rb
|
@@ -926,6 +940,14 @@ files:
|
|
926
940
|
- app/pb_kits/playbook/pb_table/styles/_table-dark.scss
|
927
941
|
- app/pb_kits/playbook/pb_table/styles/_variables.scss
|
928
942
|
- app/pb_kits/playbook/pb_table/table.rb
|
943
|
+
- app/pb_kits/playbook/pb_text_input/_text_input.html.erb
|
944
|
+
- app/pb_kits/playbook/pb_text_input/_text_input.jsx
|
945
|
+
- app/pb_kits/playbook/pb_text_input/_text_input.scss
|
946
|
+
- app/pb_kits/playbook/pb_text_input/docs/_text_input_default.html.erb
|
947
|
+
- app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx
|
948
|
+
- app/pb_kits/playbook/pb_text_input/docs/example.yml
|
949
|
+
- app/pb_kits/playbook/pb_text_input/docs/index.js
|
950
|
+
- app/pb_kits/playbook/pb_text_input/text_input.rb
|
929
951
|
- app/pb_kits/playbook/pb_time/_time.html.erb
|
930
952
|
- app/pb_kits/playbook/pb_time/_time.jsx
|
931
953
|
- app/pb_kits/playbook/pb_time/_time.scss
|
@@ -1008,19 +1030,6 @@ files:
|
|
1008
1030
|
- app/pb_kits/playbook/pb_user_badge/docs/example.yml
|
1009
1031
|
- app/pb_kits/playbook/pb_user_badge/docs/index.js
|
1010
1032
|
- app/pb_kits/playbook/pb_user_badge/user_badge.rb
|
1011
|
-
- app/pb_kits/playbook/pb_vertical_nav/_item.html.erb
|
1012
|
-
- app/pb_kits/playbook/pb_vertical_nav/_item.jsx
|
1013
|
-
- app/pb_kits/playbook/pb_vertical_nav/_vertical_nav.html.erb
|
1014
|
-
- app/pb_kits/playbook/pb_vertical_nav/_vertical_nav.jsx
|
1015
|
-
- app/pb_kits/playbook/pb_vertical_nav/_vertical_nav.scss
|
1016
|
-
- app/pb_kits/playbook/pb_vertical_nav/docs/_block_nav.html.erb
|
1017
|
-
- app/pb_kits/playbook/pb_vertical_nav/docs/_block_no_title.html.erb
|
1018
|
-
- app/pb_kits/playbook/pb_vertical_nav/docs/_default_nav.html.erb
|
1019
|
-
- app/pb_kits/playbook/pb_vertical_nav/docs/_default_nav.jsx
|
1020
|
-
- app/pb_kits/playbook/pb_vertical_nav/docs/example.yml
|
1021
|
-
- app/pb_kits/playbook/pb_vertical_nav/docs/index.js
|
1022
|
-
- app/pb_kits/playbook/pb_vertical_nav/item.rb
|
1023
|
-
- app/pb_kits/playbook/pb_vertical_nav/vertical_nav.rb
|
1024
1033
|
- app/pb_kits/playbook/plugins/pb_chart_plugin.js
|
1025
1034
|
- app/pb_kits/playbook/props.rb
|
1026
1035
|
- app/pb_kits/playbook/props/array.rb
|
@@ -1052,6 +1061,7 @@ files:
|
|
1052
1061
|
- app/pb_kits/playbook/utilities/_background_colors.scss
|
1053
1062
|
- app/pb_kits/playbook/utilities/_colors.scss
|
1054
1063
|
- app/pb_kits/playbook/utilities/props.js
|
1064
|
+
- app/pb_kits/playbook/utilities/text.js
|
1055
1065
|
- app/pb_kits/playbook/vendor.js
|
1056
1066
|
- app/views/layouts/playbook/_nav.html.slim
|
1057
1067
|
- app/views/layouts/playbook/_sidebar.html.slim
|
@@ -1,5 +0,0 @@
|
|
1
|
-
<%= pb_rails("input", props: { label: "First Name", placeholder: "Enter first name", value: "Timothy Wenhold" }) %>
|
2
|
-
<%= pb_rails("input", props: { label: "Last Name", placeholder: "Enter last name" }) %>
|
3
|
-
<%= pb_rails("input", props: { label: "Phone Number", type: "phone", placeholder: "Enter phone number" }) %>
|
4
|
-
<%= pb_rails("input", props: { label: "Email Address", type: "email", placeholder: "Enter email address" }) %>
|
5
|
-
<%= pb_rails("input", props: { label: "Zip Code", type: "number", placeholder: "Enter zip code" }) %>
|