playbook_ui 10.18.2 → 10.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/pb_body/_body.jsx +4 -2
  4. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +2 -1
  5. data/app/pb_kits/playbook/pb_body/body.rb +1 -1
  6. data/app/pb_kits/playbook/pb_body/body.test.js +29 -0
  7. data/app/pb_kits/playbook/pb_body/docs/_body_light.html.erb +5 -0
  8. data/app/pb_kits/playbook/pb_body/docs/_body_light.jsx +5 -0
  9. data/app/pb_kits/playbook/pb_body/docs/_body_light.md +6 -0
  10. data/app/pb_kits/playbook/pb_caption/_caption.jsx +5 -4
  11. data/app/pb_kits/playbook/pb_caption/_caption.scss +11 -15
  12. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +13 -3
  13. data/app/pb_kits/playbook/pb_caption/caption.rb +3 -2
  14. data/app/pb_kits/playbook/pb_caption/caption.test.js +29 -0
  15. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.html.erb +3 -0
  16. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.jsx +25 -0
  17. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.md +6 -0
  18. data/app/pb_kits/playbook/pb_caption/docs/example.yml +2 -2
  19. data/app/pb_kits/playbook/pb_caption/docs/index.js +1 -2
  20. data/app/pb_kits/playbook/pb_date/_date.jsx +1 -1
  21. data/app/pb_kits/playbook/pb_date/date.html.erb +1 -1
  22. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +3 -0
  23. data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +1 -0
  24. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -0
  25. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +10 -1
  26. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.html.erb +5 -0
  27. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.jsx +18 -0
  28. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.md +1 -0
  29. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
  30. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
  31. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_month_and_year_styles.scss +127 -0
  32. data/app/pb_kits/playbook/pb_image/_image.jsx +12 -14
  33. data/app/pb_kits/playbook/pb_image/docs/_custom_error_image.html.erb +1 -0
  34. data/app/pb_kits/playbook/pb_image/docs/_default_image.jsx +48 -35
  35. data/app/pb_kits/playbook/pb_image/docs/_rounded_image.jsx +46 -35
  36. data/app/pb_kits/playbook/pb_legend/_legend.jsx +1 -7
  37. data/app/pb_kits/playbook/pb_legend/_legend.scss +6 -2
  38. data/app/pb_kits/playbook/pb_legend/docs/_legend_colors.html.erb +4 -0
  39. data/app/pb_kits/playbook/pb_legend/docs/_legend_colors.jsx +29 -0
  40. data/app/pb_kits/playbook/pb_legend/docs/_legend_colors.md +2 -0
  41. data/app/pb_kits/playbook/pb_legend/docs/_legend_default.html.erb +2 -2
  42. data/app/pb_kits/playbook/pb_legend/docs/_legend_default.jsx +1 -1
  43. data/app/pb_kits/playbook/pb_legend/docs/example.yml +4 -4
  44. data/app/pb_kits/playbook/pb_legend/docs/index.js +1 -0
  45. data/app/pb_kits/playbook/pb_legend/legend.rb +1 -2
  46. data/app/pb_kits/playbook/pb_legend/legend.test.js +29 -0
  47. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +22 -0
  48. data/app/pb_kits/playbook/pb_nav/_horizontal_nav.scss +17 -1
  49. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +9 -2
  50. data/app/pb_kits/playbook/pb_nav/docs/_bold_horizontal_nav.html.erb +6 -0
  51. data/app/pb_kits/playbook/pb_nav/docs/_bold_horizontal_nav.jsx +39 -0
  52. data/app/pb_kits/playbook/pb_nav/docs/_bold_vertical_nav.html.erb +6 -0
  53. data/app/pb_kits/playbook/pb_nav/docs/_bold_vertical_nav.jsx +39 -0
  54. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav.html.erb +1 -1
  55. data/app/pb_kits/playbook/pb_nav/docs/_subtle_nav.html.erb +1 -1
  56. data/app/pb_kits/playbook/pb_nav/docs/example.yml +4 -0
  57. data/app/pb_kits/playbook/pb_nav/docs/index.js +2 -0
  58. data/app/pb_kits/playbook/pb_nav/nav.rb +1 -1
  59. data/app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx +3 -0
  60. data/app/pb_kits/playbook/pb_popover/docs/_popover_z_index.jsx +1 -0
  61. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +6 -2
  62. data/app/pb_kits/playbook/pb_section_separator/_section_separator_mixin.scss +0 -2
  63. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +62 -13
  64. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb +21 -2
  65. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +12 -3
  66. data/app/pb_kits/playbook/pb_title/_title.jsx +6 -3
  67. data/app/pb_kits/playbook/pb_title/_title.scss +5 -5
  68. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +17 -0
  69. data/app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb +4 -0
  70. data/app/pb_kits/playbook/pb_title/docs/_title_colors.jsx +37 -0
  71. data/app/pb_kits/playbook/pb_title/docs/_title_colors.md +6 -0
  72. data/app/pb_kits/playbook/pb_title/docs/_title_light.md +3 -0
  73. data/app/pb_kits/playbook/pb_title/docs/example.yml +2 -2
  74. data/app/pb_kits/playbook/pb_title/docs/index.js +1 -1
  75. data/app/pb_kits/playbook/pb_title/title.html.erb +2 -3
  76. data/app/pb_kits/playbook/pb_title/title.rb +6 -2
  77. data/app/pb_kits/playbook/pb_title/title.test.js +29 -0
  78. data/app/pb_kits/playbook/utilities/_line_height.scss +11 -0
  79. data/app/pb_kits/playbook/utilities/globalProps.js +7 -1
  80. data/lib/playbook/classnames.rb +1 -0
  81. data/lib/playbook/kit_base.rb +2 -0
  82. data/lib/playbook/line_height.rb +29 -0
  83. data/lib/playbook/version.rb +2 -2
  84. metadata +28 -11
  85. data/app/pb_kits/playbook/pb_caption/docs/_caption_example.html.erb +0 -3
  86. data/app/pb_kits/playbook/pb_caption/docs/_caption_example.jsx +0 -27
  87. data/app/pb_kits/playbook/pb_caption/docs/_caption_example.md +0 -1
  88. data/app/pb_kits/playbook/pb_caption/docs/_caption_variants.html.erb +0 -1
  89. data/app/pb_kits/playbook/pb_caption/docs/_caption_variants.jsx +0 -17
  90. data/app/pb_kits/playbook/pb_caption/docs/_caption_variants.md +0 -3
  91. data/app/pb_kits/playbook/pb_title/docs/_title_variants.html.erb +0 -1
  92. data/app/pb_kits/playbook/pb_title/docs/_title_variants.jsx +0 -19
  93. data/app/pb_kits/playbook/pb_title/docs/_title_variants.md +0 -3
@@ -10,8 +10,6 @@
10
10
  content: "";
11
11
  height: 100%;
12
12
  width: 1px;
13
- margin-left: $space_xs;
14
- margin-right: $space_xs;
15
13
  position: initial;
16
14
  z-index: 0;
17
15
  }
@@ -88,6 +88,56 @@
88
88
  border-color: $error;
89
89
  }
90
90
  }
91
+ .text_input_wrapper_add_on {
92
+ .add-on {
93
+ &-right {
94
+ .add-on-card {
95
+ border: 1px solid $error;
96
+ border-left: 0;
97
+ }
98
+ }
99
+ &-left {
100
+ .add-on-card {
101
+ border: 1px solid $error;
102
+ border-right: 0;
103
+ }
104
+ }
105
+ }
106
+ .border {
107
+ &_left {
108
+ &_on {
109
+ .card-right-aligned {
110
+ border-left: 0;
111
+ }
112
+ }
113
+ &_off {
114
+ .card-right-aligned {
115
+ border-left: 0;
116
+ }
117
+ .text_input {
118
+ border-right: 0;
119
+ padding-right: 0;
120
+ }
121
+ }
122
+ }
123
+ &_right {
124
+ &_on {
125
+ .card-left-aligned {
126
+ border-right: 0;
127
+ }
128
+ }
129
+ &_off {
130
+ .card-left-aligned {
131
+ border-right: 0;
132
+ }
133
+ .text_input {
134
+ border-left: 0;
135
+ padding-left: 0;
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
91
141
  }
92
142
  &.inline {
93
143
  .text_input_wrapper input::placeholder,
@@ -132,15 +182,15 @@
132
182
  }
133
183
  &-left {
134
184
  .text_input {
135
- border-top-left-radius: 0 !important;
136
- border-bottom-left-radius: 0 !important;
185
+ border-top-left-radius: 0;
186
+ border-bottom-left-radius: 0;
137
187
  }
138
188
  }
139
189
 
140
190
  &-right {
141
191
  .text_input{
142
- border-top-right-radius: 0 !important;
143
- border-bottom-right-radius: 0 !important;
192
+ border-top-right-radius: 0;
193
+ border-bottom-right-radius: 0;
144
194
  }
145
195
  }
146
196
  }
@@ -148,15 +198,14 @@
148
198
  background-color: $focus_input_dark;
149
199
  border-width: 0px;
150
200
  }
151
-
152
201
  .card-left-aligned {
153
- border-top-right-radius: 0 !important;
154
- border-bottom-right-radius: 0 !important;
202
+ border-top-right-radius: 0;
203
+ border-bottom-right-radius: 0;
155
204
  }
156
205
 
157
206
  .card-right-aligned {
158
- border-top-left-radius: 0 !important;
159
- border-bottom-left-radius: 0 !important;
207
+ border-top-left-radius: 0;
208
+ border-bottom-left-radius: 0;
160
209
  }
161
210
 
162
211
  .border {
@@ -165,8 +214,8 @@
165
214
  border-right: 0;
166
215
  }
167
216
  .text_input {
168
- border-left: 0 !important;
169
- padding-left: 0 !important;
217
+ border-left: 0;
218
+ padding-left: 0;
170
219
  }
171
220
  }
172
221
  &_left_on {
@@ -184,8 +233,8 @@
184
233
  border-left: 0;
185
234
  }
186
235
  .text_input {
187
- border-right: 0 !important;
188
- padding-right: 0 !important;
236
+ border-right: 0;
237
+ padding-right: 0;
189
238
  }
190
239
  }
191
240
  }
@@ -1,2 +1,21 @@
1
- <%= pb_rails("text_input", props: { error: "Please enter a valid email address", label: "Email Address", type: "email", placeholder: "Enter email address" }) %>
2
- <%= pb_rails("text_input", props: { label: "Confirm Email Address", type: "email", placeholder: "Confirm email address" }) %>
1
+ <%= pb_rails("text_input", props: {
2
+ add_on: {
3
+ alignment: "left",
4
+ border: true,
5
+ icon: "user"
6
+ },
7
+ error: "Please enter a valid email address",
8
+ label: "Email Address",
9
+ placeholder: "Enter email address",
10
+ type: "email"
11
+ }) %>
12
+ <%= pb_rails("text_input", props: {
13
+ add_on: {
14
+ alignment: "left",
15
+ border: true,
16
+ icon: "user"
17
+ },
18
+ label: "Confirm Email Address",
19
+ placeholder: "Confirm email address",
20
+ type: "email"
21
+ }) %>
@@ -1,7 +1,6 @@
1
1
  import React, { useState } from 'react'
2
- import {
3
- TextInput,
4
- } from '../..'
2
+
3
+ import TextInput from '../_text_input'
5
4
 
6
5
  const TextInputError = (props) => {
7
6
  const [email, setEmail] = useState('')
@@ -12,6 +11,7 @@ const TextInputError = (props) => {
12
11
  return (
13
12
  <div>
14
13
  <TextInput
14
+ addOn={{ icon: 'user', alignment: 'left', border: true }}
15
15
  error="Please enter a valid email address"
16
16
  label="Email Address"
17
17
  onChange={handleUpdateEmail}
@@ -20,6 +20,15 @@ const TextInputError = (props) => {
20
20
  value={email}
21
21
  {...props}
22
22
  />
23
+ <TextInput
24
+ addOn={{ icon: 'user', alignment: 'left', border: true }}
25
+ label="Confirm Email Address"
26
+ onChange={handleUpdateEmail}
27
+ placeholder="Confirm email address"
28
+ type="email"
29
+ value={email}
30
+ {...props}
31
+ />
23
32
  </div>
24
33
  )
25
34
  }
@@ -3,12 +3,13 @@
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
- import { globalProps } from '../utilities/globalProps.js'
6
+ import { deprecatedProps, globalProps } from '../utilities/globalProps.js'
7
7
 
8
8
  type TitleProps = {
9
9
  aria?: object,
10
10
  children?: array<React.ReactNode> | React.ReactNode,
11
11
  className?: string,
12
+ color?: "default" | "light" | "lighter" | "success" | "error" | "link",
12
13
  data?: object,
13
14
  id?: string,
14
15
  size?: 1 | 2 | 3 | 4,
@@ -18,10 +19,12 @@ type TitleProps = {
18
19
  }
19
20
 
20
21
  const Title = (props: TitleProps) => {
22
+ if (props.variant) deprecatedProps('Title', ['variant']) //variant prop is deprecated, use color instead
21
23
  const {
22
24
  aria = {},
23
25
  children,
24
26
  className,
27
+ color,
25
28
  data = {},
26
29
  id,
27
30
  size = 3,
@@ -33,9 +36,9 @@ const Title = (props: TitleProps) => {
33
36
  const ariaProps = buildAriaProps(aria)
34
37
  const dataProps = buildDataProps(data)
35
38
  const classes = classnames(
36
- buildCss('pb_title_kit', size, variant),
39
+ buildCss('pb_title_kit', size, variant, color),
37
40
  globalProps(props),
38
- className
41
+ className,
39
42
  )
40
43
  const Tag = `${tag}`
41
44
 
@@ -1,26 +1,26 @@
1
1
  @import "../tokens/titles";
2
2
  @import "../tokens/colors";
3
+ @import './title_mixin';
3
4
 
4
5
  [class^=pb_title_kit]{
5
6
  &[class*=_1] {
6
7
  @include pb_title_1;
8
+ @include title_colors;
7
9
  }
8
10
 
9
11
  &[class*=_2] {
10
12
  @include pb_title_2;
13
+ @include title_colors;
11
14
  }
12
15
 
13
16
  &[class*=_3] {
14
17
  @include pb_title_3;
18
+ @include title_colors;
15
19
  }
16
20
 
17
21
  &[class*=_4] {
18
22
  @include pb_title_4;
19
-
20
- &[class*=_link] {
21
- color: $primary;
22
- }
23
-
23
+ @include title_colors;
24
24
  }
25
25
 
26
26
  &.dark {
@@ -1 +1,18 @@
1
1
  @import "../tokens/titles";
2
+
3
+ $pb_title_colors: (
4
+ default: $text_lt_default,
5
+ light: $text_lt_light,
6
+ lighter: $text_lt_lighter,
7
+ success: $success,
8
+ error: $error,
9
+ link: $primary
10
+ );
11
+
12
+ @mixin title_colors {
13
+ @each $name, $color in $pb_title_colors {
14
+ &[class*=_#{$name}] {
15
+ color: $color
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,4 @@
1
+ <%= pb_rails("title", props: { text: "Default Color", tag: "h1", size: 3 }) %>
2
+ <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "link" }) %>
3
+ <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "success" }) %>
4
+ <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "error" }) %>
@@ -0,0 +1,37 @@
1
+ import React from 'react'
2
+
3
+ import Title from '../_title'
4
+
5
+ const TitleColors = (props) => {
6
+ return (
7
+ <div>
8
+ <Title
9
+ text="Default Color"
10
+ {...props}
11
+ />
12
+ <Title
13
+ color="link"
14
+ size={3}
15
+ tag="h1"
16
+ text="Title Color"
17
+ {...props}
18
+ />
19
+ <Title
20
+ color="success"
21
+ size={3}
22
+ tag="h1"
23
+ text="Title Color"
24
+ {...props}
25
+ />
26
+ <Title
27
+ color="error"
28
+ size={3}
29
+ tag="h1"
30
+ text="Title Color"
31
+ {...props}
32
+ />
33
+ </div>
34
+ )
35
+ }
36
+
37
+ export default TitleColors
@@ -0,0 +1,6 @@
1
+ ##### Prop
2
+ Title kit will use `default` color by default. Other available colors are:
3
+
4
+ *`light` `lighter` `success` `error` `link`
5
+
6
+ - These colors are not for standard usage. You can use the color prop to make fixes if colors are not appearing properly, but consult your UX team members if you are deciding to implement it
@@ -0,0 +1,3 @@
1
+ ##### Prop
2
+ Title kit will use `h3` tag by default, and `size 3` as well.
3
+ Size and tag props are not in correlation with each other, meaning any size can be used along with any tag.
@@ -1,8 +1,8 @@
1
1
  examples:
2
2
  rails:
3
3
  - title_light: Light UI
4
- - title_variants: Variants
4
+ - title_colors: Colors
5
5
 
6
6
  react:
7
7
  - title_light: Light UI
8
- - title_variants: Variants
8
+ - title_colors: Colors
@@ -1,2 +1,2 @@
1
1
  export { default as TitleLight } from './_title_light.jsx'
2
- export { default as TitleVariants } from './_title_variants.jsx'
2
+ export { default as TitleColors } from './_title_colors.jsx'
@@ -2,6 +2,5 @@
2
2
  aria: object.aria,
3
3
  id: object.id,
4
4
  data: object.data,
5
- class: object.classname) do %>
6
- <%= content.presence || object.text %>
7
- <% end %>
5
+ class: object.classname) do %><%= content.presence || object.text %><% end %>
6
+
@@ -3,6 +3,9 @@
3
3
  module Playbook
4
4
  module PbTitle
5
5
  class Title < Playbook::KitBase
6
+ prop :color, type: Playbook::Props::Enum,
7
+ values: [nil, "default", "light", "lighter", "success", "error", "link"],
8
+ default: nil
6
9
  prop :size, type: Playbook::Props::Enum,
7
10
  values: [1, 2, 3, 4],
8
11
  default: 3
@@ -12,10 +15,11 @@ module Playbook
12
15
  prop :text
13
16
  prop :variant, type: Playbook::Props::Enum,
14
17
  values: [nil, "link"],
15
- default: nil
18
+ default: nil,
19
+ deprecated: true
16
20
 
17
21
  def classname
18
- generate_classname("pb_title_kit", size, variant)
22
+ generate_classname("pb_title_kit", size, variant, color)
19
23
  end
20
24
  end
21
25
  end
@@ -0,0 +1,29 @@
1
+ import React from 'react'
2
+ import { render, screen } from '../utilities/test-utils'
3
+
4
+ import Title from './_title'
5
+
6
+ test('returns namespaced class name', () => {
7
+ render(
8
+ <Title
9
+ data={{ testid: 'primary-test' }}
10
+ text="Test colors"
11
+ />
12
+ )
13
+
14
+ const kit = screen.getByTestId('primary-test')
15
+ expect(kit).toHaveClass('pb_title_kit_3')
16
+ })
17
+
18
+ test('with colors', () => {
19
+ render(
20
+ <Title
21
+ color="success"
22
+ data={{ testid: 'primary-test' }}
23
+ text="Test colors"
24
+ />
25
+ )
26
+
27
+ const kit = screen.getByTestId('primary-test')
28
+ expect(kit).toHaveClass('pb_title_kit_3_success')
29
+ })
@@ -0,0 +1,11 @@
1
+ @import "../tokens/exports/line_height";
2
+
3
+ @mixin line-height-classes($line-height-list) {
4
+ @each $name, $line-height in $line-height-list {
5
+ [class*=pb_] .line_height_#{$name} {
6
+ line-height: $line-height;
7
+ }
8
+ }
9
+ }
10
+ @include line-height-classes($line_height);
11
+
@@ -63,6 +63,12 @@ const shadowProps = ({ shadow }) => {
63
63
  return css
64
64
  }
65
65
 
66
+ const lineHeightProps = ({ lineHeight }) => {
67
+ let css = ''
68
+ css += lineHeight ? `line_height_${lineHeight} ` : ''
69
+ return css
70
+ }
71
+
66
72
  const displayProps = ({ display }) => {
67
73
  let css = ''
68
74
  css += display ? `display_${display} ` : ''
@@ -78,7 +84,7 @@ const cursorProps = ({ cursor }) => {
78
84
  // All Exported as a single function
79
85
  export const globalProps = (props, defaultProps = {}) => {
80
86
  const allProps = { ...props, ...defaultProps }
81
- return spacingProps(allProps) + darkProps(allProps) + maxWidthProps(allProps) + zIndexProps(allProps) + numberSpacingProps(allProps) + shadowProps(allProps) + displayProps(allProps) + cursorProps(allProps)
87
+ return spacingProps(allProps) + darkProps(allProps) + maxWidthProps(allProps) + zIndexProps(allProps) + numberSpacingProps(allProps) + shadowProps(allProps) + lineHeightProps(allProps) + cursorProps(allProps) + displayProps(allProps)
82
88
  }
83
89
 
84
90
  export const deprecatedProps = (kit, props = []) => {
@@ -17,6 +17,7 @@ module Playbook
17
17
  z_index_props,
18
18
  number_spacing_props,
19
19
  shadow_props,
20
+ line_height_props,
20
21
  display_props,
21
22
  cursor_props,
22
23
  ].compact.join(" ")
@@ -5,6 +5,7 @@ require "playbook/spacing"
5
5
  require "playbook/z_index"
6
6
  require "playbook/number_spacing"
7
7
  require "playbook/shadow"
8
+ require "playbook/line_height"
8
9
  require "playbook/display"
9
10
  require "playbook/cursor"
10
11
 
@@ -17,6 +18,7 @@ module Playbook
17
18
  include Playbook::ZIndex
18
19
  include Playbook::NumberSpacing
19
20
  include Playbook::Shadow
21
+ include Playbook::LineHeight
20
22
  include Playbook::Display
21
23
  include Playbook::Cursor
22
24
 
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module LineHeight
5
+ def self.included(base)
6
+ base.prop :line_height
7
+ end
8
+
9
+ def line_height_props
10
+ selected_props = line_height_options.keys.select { |sk| try(sk) }
11
+ return nil unless selected_props.present?
12
+
13
+ selected_props.map do |k|
14
+ line_height_value = send(k)
15
+ "line_height_#{line_height_value}" if line_height_values.include? line_height_value
16
+ end.compact.join(" ")
17
+ end
18
+
19
+ def line_height_options
20
+ {
21
+ line_height: "line_height",
22
+ }
23
+ end
24
+
25
+ def line_height_values
26
+ %w[tightest tighter tight normal loose looser loosest]
27
+ end
28
+ end
29
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "10.18.1"
5
- VERSION = "10.18.2"
4
+ PREVIOUS_VERSION = "10.19.0"
5
+ VERSION = "10.20.0"
6
6
  end
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: 10.18.2
4
+ version: 10.20.0
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: 2022-01-26 00:00:00.000000000 Z
12
+ date: 2022-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -380,10 +380,12 @@ files:
380
380
  - app/pb_kits/playbook/pb_body/_body_mixins.scss
381
381
  - app/pb_kits/playbook/pb_body/body.html.erb
382
382
  - app/pb_kits/playbook/pb_body/body.rb
383
+ - app/pb_kits/playbook/pb_body/body.test.js
383
384
  - app/pb_kits/playbook/pb_body/docs/_body_block.html.erb
384
385
  - app/pb_kits/playbook/pb_body/docs/_body_block.jsx
385
386
  - app/pb_kits/playbook/pb_body/docs/_body_light.html.erb
386
387
  - app/pb_kits/playbook/pb_body/docs/_body_light.jsx
388
+ - app/pb_kits/playbook/pb_body/docs/_body_light.md
387
389
  - app/pb_kits/playbook/pb_body/docs/_description.md
388
390
  - app/pb_kits/playbook/pb_body/docs/_footer.md
389
391
  - app/pb_kits/playbook/pb_body/docs/example.yml
@@ -446,16 +448,14 @@ files:
446
448
  - app/pb_kits/playbook/pb_caption/_caption_mixin.scss
447
449
  - app/pb_kits/playbook/pb_caption/caption.html.erb
448
450
  - app/pb_kits/playbook/pb_caption/caption.rb
451
+ - app/pb_kits/playbook/pb_caption/caption.test.js
449
452
  - app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb
450
453
  - app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx
451
- - app/pb_kits/playbook/pb_caption/docs/_caption_example.html.erb
452
- - app/pb_kits/playbook/pb_caption/docs/_caption_example.jsx
453
- - app/pb_kits/playbook/pb_caption/docs/_caption_example.md
454
+ - app/pb_kits/playbook/pb_caption/docs/_caption_colors.html.erb
455
+ - app/pb_kits/playbook/pb_caption/docs/_caption_colors.jsx
456
+ - app/pb_kits/playbook/pb_caption/docs/_caption_colors.md
454
457
  - app/pb_kits/playbook/pb_caption/docs/_caption_light.html.erb
455
458
  - app/pb_kits/playbook/pb_caption/docs/_caption_light.jsx
456
- - app/pb_kits/playbook/pb_caption/docs/_caption_variants.html.erb
457
- - app/pb_kits/playbook/pb_caption/docs/_caption_variants.jsx
458
- - app/pb_kits/playbook/pb_caption/docs/_caption_variants.md
459
459
  - app/pb_kits/playbook/pb_caption/docs/_description.md
460
460
  - app/pb_kits/playbook/pb_caption/docs/_footer.md
461
461
  - app/pb_kits/playbook/pb_caption/docs/example.yml
@@ -666,6 +666,9 @@ files:
666
666
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_label.md
667
667
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.html.erb
668
668
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.jsx
669
+ - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.html.erb
670
+ - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.jsx
671
+ - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.md
669
672
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.jsx
670
673
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.md
671
674
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb
@@ -681,6 +684,7 @@ files:
681
684
  - app/pb_kits/playbook/pb_date_picker/sass_partials/_flatpickr_styles.scss
682
685
  - app/pb_kits/playbook/pb_date_picker/sass_partials/_header_styles.scss
683
686
  - app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss
687
+ - app/pb_kits/playbook/pb_date_picker/sass_partials/_month_and_year_styles.scss
684
688
  - app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss
685
689
  - app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx
686
690
  - app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss
@@ -1160,6 +1164,9 @@ files:
1160
1164
  - app/pb_kits/playbook/pb_legend/_legend.scss
1161
1165
  - app/pb_kits/playbook/pb_legend/docs/_description.md
1162
1166
  - app/pb_kits/playbook/pb_legend/docs/_footer.md
1167
+ - app/pb_kits/playbook/pb_legend/docs/_legend_colors.html.erb
1168
+ - app/pb_kits/playbook/pb_legend/docs/_legend_colors.jsx
1169
+ - app/pb_kits/playbook/pb_legend/docs/_legend_colors.md
1163
1170
  - app/pb_kits/playbook/pb_legend/docs/_legend_default.html.erb
1164
1171
  - app/pb_kits/playbook/pb_legend/docs/_legend_default.jsx
1165
1172
  - app/pb_kits/playbook/pb_legend/docs/_legend_prefix.html.erb
@@ -1168,6 +1175,7 @@ files:
1168
1175
  - app/pb_kits/playbook/pb_legend/docs/index.js
1169
1176
  - app/pb_kits/playbook/pb_legend/legend.html.erb
1170
1177
  - app/pb_kits/playbook/pb_legend/legend.rb
1178
+ - app/pb_kits/playbook/pb_legend/legend.test.js
1171
1179
  - app/pb_kits/playbook/pb_line_graph/_line_graph.jsx
1172
1180
  - app/pb_kits/playbook/pb_line_graph/_line_graph.scss
1173
1181
  - app/pb_kits/playbook/pb_line_graph/docs/_description.md
@@ -1259,6 +1267,7 @@ files:
1259
1267
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js
1260
1268
  - app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb
1261
1269
  - app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb
1270
+ - app/pb_kits/playbook/pb_nav/_bold_mixin.scss
1262
1271
  - app/pb_kits/playbook/pb_nav/_horizontal_nav.scss
1263
1272
  - app/pb_kits/playbook/pb_nav/_item.jsx
1264
1273
  - app/pb_kits/playbook/pb_nav/_nav.jsx
@@ -1269,6 +1278,10 @@ files:
1269
1278
  - app/pb_kits/playbook/pb_nav/docs/_block_nav.jsx
1270
1279
  - app/pb_kits/playbook/pb_nav/docs/_block_no_title_nav.html.erb
1271
1280
  - app/pb_kits/playbook/pb_nav/docs/_block_no_title_nav.jsx
1281
+ - app/pb_kits/playbook/pb_nav/docs/_bold_horizontal_nav.html.erb
1282
+ - app/pb_kits/playbook/pb_nav/docs/_bold_horizontal_nav.jsx
1283
+ - app/pb_kits/playbook/pb_nav/docs/_bold_vertical_nav.html.erb
1284
+ - app/pb_kits/playbook/pb_nav/docs/_bold_vertical_nav.jsx
1272
1285
  - app/pb_kits/playbook/pb_nav/docs/_borderless_nav.html.erb
1273
1286
  - app/pb_kits/playbook/pb_nav/docs/_borderless_nav.jsx
1274
1287
  - app/pb_kits/playbook/pb_nav/docs/_default_nav.html.erb
@@ -1859,15 +1872,17 @@ files:
1859
1872
  - app/pb_kits/playbook/pb_title/_title.scss
1860
1873
  - app/pb_kits/playbook/pb_title/_title_mixin.scss
1861
1874
  - app/pb_kits/playbook/pb_title/docs/_description.md
1875
+ - app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb
1876
+ - app/pb_kits/playbook/pb_title/docs/_title_colors.jsx
1877
+ - app/pb_kits/playbook/pb_title/docs/_title_colors.md
1862
1878
  - app/pb_kits/playbook/pb_title/docs/_title_light.html.erb
1863
1879
  - app/pb_kits/playbook/pb_title/docs/_title_light.jsx
1864
- - app/pb_kits/playbook/pb_title/docs/_title_variants.html.erb
1865
- - app/pb_kits/playbook/pb_title/docs/_title_variants.jsx
1866
- - app/pb_kits/playbook/pb_title/docs/_title_variants.md
1880
+ - app/pb_kits/playbook/pb_title/docs/_title_light.md
1867
1881
  - app/pb_kits/playbook/pb_title/docs/example.yml
1868
1882
  - app/pb_kits/playbook/pb_title/docs/index.js
1869
1883
  - app/pb_kits/playbook/pb_title/title.html.erb
1870
1884
  - app/pb_kits/playbook/pb_title/title.rb
1885
+ - app/pb_kits/playbook/pb_title/title.test.js
1871
1886
  - app/pb_kits/playbook/pb_title_count/_title_count.jsx
1872
1887
  - app/pb_kits/playbook/pb_title_count/_title_count.scss
1873
1888
  - app/pb_kits/playbook/pb_title_count/docs/_description.md
@@ -2043,6 +2058,7 @@ files:
2043
2058
  - app/pb_kits/playbook/utilities/_colors.scss
2044
2059
  - app/pb_kits/playbook/utilities/_cursor.scss
2045
2060
  - app/pb_kits/playbook/utilities/_display.scss
2061
+ - app/pb_kits/playbook/utilities/_line_height.scss
2046
2062
  - app/pb_kits/playbook/utilities/_max_width.scss
2047
2063
  - app/pb_kits/playbook/utilities/_number_spacing.scss
2048
2064
  - app/pb_kits/playbook/utilities/_positioning.scss
@@ -2071,6 +2087,7 @@ files:
2071
2087
  - lib/playbook/forms/builder/typeahead_field.rb
2072
2088
  - lib/playbook/kit_base.rb
2073
2089
  - lib/playbook/kit_resolver.rb
2090
+ - lib/playbook/line_height.rb
2074
2091
  - lib/playbook/markdown.rb
2075
2092
  - lib/playbook/markdown/helper.rb
2076
2093
  - lib/playbook/markdown/template_handler.rb
@@ -1,3 +0,0 @@
1
- <%= pb_rails("caption", props: { color: "default", text: "text default" }) %>
2
- <%= pb_rails("caption", props: { color: "light", text: "text light" }) %>
3
- <%= pb_rails("caption", props: { color: "link", text: "text link" }) %>