playbook_ui 10.18.2 → 10.19.0.pre.lightbox

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -0
  3. data/app/pb_kits/playbook/data/menu.yml +1 -0
  4. data/app/pb_kits/playbook/index.js +2 -1
  5. data/app/pb_kits/playbook/pb_body/_body.jsx +1 -1
  6. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +2 -1
  7. data/app/pb_kits/playbook/pb_body/body.rb +1 -1
  8. data/app/pb_kits/playbook/pb_body/body.test.js +29 -0
  9. data/app/pb_kits/playbook/pb_body/docs/_body_light.html.erb +5 -0
  10. data/app/pb_kits/playbook/pb_body/docs/_body_light.jsx +5 -0
  11. data/app/pb_kits/playbook/pb_body/docs/_body_light.md +6 -0
  12. data/app/pb_kits/playbook/pb_caption/_caption.jsx +6 -6
  13. data/app/pb_kits/playbook/pb_caption/_caption.scss +6 -17
  14. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +13 -3
  15. data/app/pb_kits/playbook/pb_caption/caption.rb +3 -5
  16. data/app/pb_kits/playbook/pb_caption/caption.test.js +29 -0
  17. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.html.erb +3 -0
  18. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.jsx +25 -0
  19. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.md +6 -0
  20. data/app/pb_kits/playbook/pb_caption/docs/example.yml +2 -2
  21. data/app/pb_kits/playbook/pb_caption/docs/index.js +1 -2
  22. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slide.jsx +53 -0
  23. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.jsx +54 -0
  24. data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.jsx +39 -0
  25. data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnails.jsx +82 -0
  26. data/app/pb_kits/playbook/pb_lightbox/Carousel/index.jsx +54 -0
  27. data/app/pb_kits/playbook/pb_lightbox/Carousel/styles.scss +110 -0
  28. data/app/pb_kits/playbook/pb_lightbox/Carousel/useSlides.js +66 -0
  29. data/app/pb_kits/playbook/pb_lightbox/Carousel/useUnscrollableBody.js +11 -0
  30. data/app/pb_kits/playbook/pb_lightbox/_lightbox.jsx +81 -0
  31. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.jsx +65 -0
  32. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.md +1 -0
  33. data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_multiple.jsx +65 -0
  34. data/app/pb_kits/playbook/pb_lightbox/docs/example.yml +6 -0
  35. data/app/pb_kits/playbook/pb_lightbox/docs/index.js +2 -0
  36. data/app/pb_kits/playbook/pb_lightbox/hooks/useToggler.js +10 -0
  37. data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +21 -0
  38. data/app/pb_kits/playbook/pb_lightbox/hooks/useWindowSize.js +25 -0
  39. data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +92 -0
  40. data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +30 -0
  41. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +22 -0
  42. data/app/pb_kits/playbook/pb_nav/_horizontal_nav.scss +17 -1
  43. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +9 -2
  44. data/app/pb_kits/playbook/pb_nav/docs/_bold_horizontal_nav.html.erb +6 -0
  45. data/app/pb_kits/playbook/pb_nav/docs/_bold_horizontal_nav.jsx +39 -0
  46. data/app/pb_kits/playbook/pb_nav/docs/_bold_vertical_nav.html.erb +6 -0
  47. data/app/pb_kits/playbook/pb_nav/docs/_bold_vertical_nav.jsx +39 -0
  48. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav.html.erb +1 -1
  49. data/app/pb_kits/playbook/pb_nav/docs/_subtle_nav.html.erb +1 -1
  50. data/app/pb_kits/playbook/pb_nav/docs/example.yml +4 -0
  51. data/app/pb_kits/playbook/pb_nav/docs/index.js +2 -0
  52. data/app/pb_kits/playbook/pb_nav/nav.rb +1 -1
  53. data/app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx +3 -0
  54. data/app/pb_kits/playbook/pb_popover/docs/_popover_z_index.jsx +1 -0
  55. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +62 -13
  56. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb +21 -2
  57. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +12 -3
  58. data/app/pb_kits/playbook/pb_title/_title.jsx +6 -4
  59. data/app/pb_kits/playbook/pb_title/_title.scss +5 -5
  60. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +17 -0
  61. data/app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb +4 -0
  62. data/app/pb_kits/playbook/pb_title/docs/_title_colors.jsx +37 -0
  63. data/app/pb_kits/playbook/pb_title/docs/_title_colors.md +6 -0
  64. data/app/pb_kits/playbook/pb_title/docs/_title_light.md +3 -0
  65. data/app/pb_kits/playbook/pb_title/docs/example.yml +2 -2
  66. data/app/pb_kits/playbook/pb_title/docs/index.js +1 -1
  67. data/app/pb_kits/playbook/pb_title/title.html.erb +2 -3
  68. data/app/pb_kits/playbook/pb_title/title.rb +5 -4
  69. data/app/pb_kits/playbook/pb_title/title.test.js +29 -0
  70. data/app/pb_kits/playbook/playbook-doc.js +2 -0
  71. data/app/pb_kits/playbook/utilities/_line_height.scss +11 -0
  72. data/app/pb_kits/playbook/utilities/globalProps.js +7 -1
  73. data/lib/playbook/classnames.rb +1 -0
  74. data/lib/playbook/kit_base.rb +2 -0
  75. data/lib/playbook/line_height.rb +29 -0
  76. data/lib/playbook/version.rb +1 -1
  77. metadata +41 -13
  78. data/app/pb_kits/playbook/pb_caption/docs/_caption_example.html.erb +0 -3
  79. data/app/pb_kits/playbook/pb_caption/docs/_caption_example.jsx +0 -27
  80. data/app/pb_kits/playbook/pb_caption/docs/_caption_example.md +0 -1
  81. data/app/pb_kits/playbook/pb_caption/docs/_caption_variants.html.erb +0 -1
  82. data/app/pb_kits/playbook/pb_caption/docs/_caption_variants.jsx +0 -17
  83. data/app/pb_kits/playbook/pb_caption/docs/_caption_variants.md +0 -3
  84. data/app/pb_kits/playbook/pb_title/docs/_title_variants.html.erb +0 -1
  85. data/app/pb_kits/playbook/pb_title/docs/_title_variants.jsx +0 -19
  86. data/app/pb_kits/playbook/pb_title/docs/_title_variants.md +0 -3
@@ -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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "10.18.1"
5
- VERSION = "10.18.2"
5
+ VERSION = "10.19.0.pre.lightbox"
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.19.0.pre.lightbox
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-01-27 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
@@ -1168,6 +1168,25 @@ files:
1168
1168
  - app/pb_kits/playbook/pb_legend/docs/index.js
1169
1169
  - app/pb_kits/playbook/pb_legend/legend.html.erb
1170
1170
  - app/pb_kits/playbook/pb_legend/legend.rb
1171
+ - app/pb_kits/playbook/pb_lightbox/Carousel/Slide.jsx
1172
+ - app/pb_kits/playbook/pb_lightbox/Carousel/Slides.jsx
1173
+ - app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.jsx
1174
+ - app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnails.jsx
1175
+ - app/pb_kits/playbook/pb_lightbox/Carousel/index.jsx
1176
+ - app/pb_kits/playbook/pb_lightbox/Carousel/styles.scss
1177
+ - app/pb_kits/playbook/pb_lightbox/Carousel/useSlides.js
1178
+ - app/pb_kits/playbook/pb_lightbox/Carousel/useUnscrollableBody.js
1179
+ - app/pb_kits/playbook/pb_lightbox/_lightbox.jsx
1180
+ - app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.jsx
1181
+ - app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.md
1182
+ - app/pb_kits/playbook/pb_lightbox/docs/_lightbox_multiple.jsx
1183
+ - app/pb_kits/playbook/pb_lightbox/docs/example.yml
1184
+ - app/pb_kits/playbook/pb_lightbox/docs/index.js
1185
+ - app/pb_kits/playbook/pb_lightbox/hooks/useToggler.js
1186
+ - app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js
1187
+ - app/pb_kits/playbook/pb_lightbox/hooks/useWindowSize.js
1188
+ - app/pb_kits/playbook/pb_lightbox/lightbox.scss
1189
+ - app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx
1171
1190
  - app/pb_kits/playbook/pb_line_graph/_line_graph.jsx
1172
1191
  - app/pb_kits/playbook/pb_line_graph/_line_graph.scss
1173
1192
  - app/pb_kits/playbook/pb_line_graph/docs/_description.md
@@ -1259,6 +1278,7 @@ files:
1259
1278
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js
1260
1279
  - app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb
1261
1280
  - app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb
1281
+ - app/pb_kits/playbook/pb_nav/_bold_mixin.scss
1262
1282
  - app/pb_kits/playbook/pb_nav/_horizontal_nav.scss
1263
1283
  - app/pb_kits/playbook/pb_nav/_item.jsx
1264
1284
  - app/pb_kits/playbook/pb_nav/_nav.jsx
@@ -1269,6 +1289,10 @@ files:
1269
1289
  - app/pb_kits/playbook/pb_nav/docs/_block_nav.jsx
1270
1290
  - app/pb_kits/playbook/pb_nav/docs/_block_no_title_nav.html.erb
1271
1291
  - app/pb_kits/playbook/pb_nav/docs/_block_no_title_nav.jsx
1292
+ - app/pb_kits/playbook/pb_nav/docs/_bold_horizontal_nav.html.erb
1293
+ - app/pb_kits/playbook/pb_nav/docs/_bold_horizontal_nav.jsx
1294
+ - app/pb_kits/playbook/pb_nav/docs/_bold_vertical_nav.html.erb
1295
+ - app/pb_kits/playbook/pb_nav/docs/_bold_vertical_nav.jsx
1272
1296
  - app/pb_kits/playbook/pb_nav/docs/_borderless_nav.html.erb
1273
1297
  - app/pb_kits/playbook/pb_nav/docs/_borderless_nav.jsx
1274
1298
  - app/pb_kits/playbook/pb_nav/docs/_default_nav.html.erb
@@ -1859,15 +1883,17 @@ files:
1859
1883
  - app/pb_kits/playbook/pb_title/_title.scss
1860
1884
  - app/pb_kits/playbook/pb_title/_title_mixin.scss
1861
1885
  - app/pb_kits/playbook/pb_title/docs/_description.md
1886
+ - app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb
1887
+ - app/pb_kits/playbook/pb_title/docs/_title_colors.jsx
1888
+ - app/pb_kits/playbook/pb_title/docs/_title_colors.md
1862
1889
  - app/pb_kits/playbook/pb_title/docs/_title_light.html.erb
1863
1890
  - 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
1891
+ - app/pb_kits/playbook/pb_title/docs/_title_light.md
1867
1892
  - app/pb_kits/playbook/pb_title/docs/example.yml
1868
1893
  - app/pb_kits/playbook/pb_title/docs/index.js
1869
1894
  - app/pb_kits/playbook/pb_title/title.html.erb
1870
1895
  - app/pb_kits/playbook/pb_title/title.rb
1896
+ - app/pb_kits/playbook/pb_title/title.test.js
1871
1897
  - app/pb_kits/playbook/pb_title_count/_title_count.jsx
1872
1898
  - app/pb_kits/playbook/pb_title_count/_title_count.scss
1873
1899
  - app/pb_kits/playbook/pb_title_count/docs/_description.md
@@ -2043,6 +2069,7 @@ files:
2043
2069
  - app/pb_kits/playbook/utilities/_colors.scss
2044
2070
  - app/pb_kits/playbook/utilities/_cursor.scss
2045
2071
  - app/pb_kits/playbook/utilities/_display.scss
2072
+ - app/pb_kits/playbook/utilities/_line_height.scss
2046
2073
  - app/pb_kits/playbook/utilities/_max_width.scss
2047
2074
  - app/pb_kits/playbook/utilities/_number_spacing.scss
2048
2075
  - app/pb_kits/playbook/utilities/_positioning.scss
@@ -2071,6 +2098,7 @@ files:
2071
2098
  - lib/playbook/forms/builder/typeahead_field.rb
2072
2099
  - lib/playbook/kit_base.rb
2073
2100
  - lib/playbook/kit_resolver.rb
2101
+ - lib/playbook/line_height.rb
2074
2102
  - lib/playbook/markdown.rb
2075
2103
  - lib/playbook/markdown/helper.rb
2076
2104
  - lib/playbook/markdown/template_handler.rb
@@ -2113,9 +2141,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2113
2141
  version: '0'
2114
2142
  required_rubygems_version: !ruby/object:Gem::Requirement
2115
2143
  requirements:
2116
- - - ">="
2144
+ - - ">"
2117
2145
  - !ruby/object:Gem::Version
2118
- version: '0'
2146
+ version: 1.3.1
2119
2147
  requirements: []
2120
2148
  rubygems_version: 3.1.6
2121
2149
  signing_key:
@@ -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" }) %>
@@ -1,27 +0,0 @@
1
-
2
- import React from 'react'
3
- import Caption from '../_caption'
4
-
5
- const CaptionExample = (props) => {
6
- return (
7
- <div>
8
- <Caption
9
- color="default"
10
- text="text default"
11
- {...props}
12
- />
13
- <Caption
14
- color="light"
15
- text="text light"
16
- {...props}
17
- />
18
- <Caption
19
- color="link"
20
- text="text link"
21
- {...props}
22
- />
23
- </div>
24
- )
25
- }
26
-
27
- export default CaptionExample
@@ -1 +0,0 @@
1
- The above examples accept different prop values for color. Those can be `default`,`link` and `light`. Passing the `light` color prop is optional as it will apply this color when no prop is being passed. The same applies to any of the variations on the Caption kit.
@@ -1 +0,0 @@
1
- <%= pb_rails("caption", props: { text: "Subcaption (link)", size: 'xs', variant: "link" }) %>
@@ -1,17 +0,0 @@
1
- import React from 'react'
2
- import { Caption } from '../../'
3
-
4
- const CaptionVariants = (props) => {
5
- return (
6
- <div>
7
- <Caption
8
- size="xs"
9
- text="Subcaption (link)"
10
- variant="link"
11
- {...props}
12
- />
13
- </div>
14
- )
15
- }
16
-
17
- export default CaptionVariants
@@ -1,3 +0,0 @@
1
- Wrap anchor tags around the kit to make it clickable.
2
-
3
- Link variant can only be applied to size `xs`.
@@ -1 +0,0 @@
1
- <%= pb_rails("title", props: { text: "Title 4 (link)", tag: "h4", size: 4, variant: "link" }) %>
@@ -1,19 +0,0 @@
1
- import React from 'react'
2
-
3
- import Title from '../_title'
4
-
5
- const TitleVariants = (props) => {
6
- return (
7
- <div>
8
- <Title
9
- size={4}
10
- tag="h4"
11
- text="Title 4 (link)"
12
- variant="link"
13
- {...props}
14
- />
15
- </div>
16
- )
17
- }
18
-
19
- export default TitleVariants
@@ -1,3 +0,0 @@
1
- Wrap anchor tags around the kit to make it clickable.
2
-
3
- Link variant can only be applied to size `4`.