playbook_ui 11.10.0.pre.alpha.pagination1 → 11.10.0.pre.alpha.pre.bold1

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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -2
  3. data/app/pb_kits/playbook/data/menu.yml +0 -1
  4. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +1 -2
  5. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +1 -1
  6. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +1 -2
  7. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.jsx +1 -0
  8. data/app/pb_kits/playbook/pb_title/_title.scss +7 -0
  9. data/app/pb_kits/playbook/pb_title/_title.tsx +4 -1
  10. data/app/pb_kits/playbook/pb_title/docs/{_title_light.html.erb → _title_default.html.erb} +1 -1
  11. data/app/pb_kits/playbook/pb_title/docs/{_title_light.jsx → _title_default.jsx} +2 -2
  12. data/app/pb_kits/playbook/pb_title/docs/{_title_light.md → _title_default.md} +0 -0
  13. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.html.erb +3 -0
  14. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.jsx +33 -0
  15. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.md +3 -0
  16. data/app/pb_kits/playbook/pb_title/docs/example.yml +4 -2
  17. data/app/pb_kits/playbook/pb_title/docs/index.js +2 -1
  18. data/app/pb_kits/playbook/pb_title/title.rb +6 -1
  19. data/app/pb_kits/playbook/pb_title/title.test.js +13 -0
  20. data/app/pb_kits/playbook/tokens/_titles.scss +11 -0
  21. data/lib/playbook/version.rb +2 -2
  22. metadata +8 -11
  23. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +0 -59
  24. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb +0 -1
  25. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.md +0 -1
  26. data/app/pb_kits/playbook/pb_pagination/docs/example.yml +0 -6
  27. data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +0 -7
  28. data/app/pb_kits/playbook/pb_pagination/pagination.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75bd3baf47e85195f6c2e1809aff3f10b73de04565235469db356469ad2596be
4
- data.tar.gz: 03adef3ba4130c0298b164e41d0487d828ca2e3f9fd0c5b8d2c68bd46348ce86
3
+ metadata.gz: 3a43eeb1b663289ece01c3728bf0c0d0348b53dcaa3ff791ac1fe255320d6f82
4
+ data.tar.gz: cf333518cc9c0532f39673f3203331652d592d4bad9b39556c07ffa126aa2a9c
5
5
  SHA512:
6
- metadata.gz: '0815f40539b2e252e03d91ea65053289af3fcd1d64165c2e68c4ae5634c6904890bc20869915b473afd599c94866be4d2825c80cdae65f4ad6c8815b203a2fd6'
7
- data.tar.gz: 191e889e44e35d7e2a479b2277b91e98e7c4065d1e33817840eb7dcee774d6ae7d2ae7adfa0c918fa3def30824d29ff8bf8aea8c76d4f4138ffa362f124149eb
6
+ metadata.gz: 9d28385a01e24ac9aca74db35b63c0d4799373a9912f0a42202f3dfa5e67a4a93f1c1299de00a4b545007a8c53a82928f990219b1db1ef25b8ff791a68aae003
7
+ data.tar.gz: 754c695cdb22bf7dfbf63550804c6f464773df5f33106995dad2266e0dc5c01e2545b88f63a9b909839cdaf5f2b10bbeb6167af180160fc88bef775ba61ba0f6
@@ -103,5 +103,3 @@
103
103
  @import './utilities/line_height';
104
104
  @import './utilities/display';
105
105
  @import './utilities/flexbox';
106
-
107
- @import 'pb_pagination/pagination';
@@ -60,7 +60,6 @@ kits:
60
60
  - badge
61
61
  - hashtag
62
62
  - pill
63
- - pagination
64
63
  - popover
65
64
  - progress:
66
65
  - progress_pills
@@ -2,6 +2,7 @@
2
2
  pb_rails("filter", props: {
3
3
  min_width: "360px",
4
4
  id: "1",
5
+ margin_bottom: "xl",
5
6
  filters: [
6
7
  { name: "name", value: "John Wick" },
7
8
  { name: "city", value: "San Francisco"}
@@ -35,8 +36,6 @@
35
36
  <% end %>
36
37
  <% end %>
37
38
 
38
- <br>
39
- <br>
40
39
 
41
40
  <%=
42
41
  pb_rails("filter", props: {
@@ -22,6 +22,7 @@ const FilterDefault = (props) => {
22
22
  'Full Name': 'John Wick',
23
23
  'City': 'San Francisco',
24
24
  }}
25
+ marginBottom="xl"
25
26
  minWidth="375px"
26
27
  onSortChange={SortingChangeCallback}
27
28
  results={1}
@@ -72,7 +73,6 @@ const FilterDefault = (props) => {
72
73
 
73
74
  </Filter>
74
75
 
75
- <br />
76
76
 
77
77
  <Filter
78
78
  double
@@ -2,6 +2,7 @@
2
2
  pb_rails("filter", props: {
3
3
  min_width: "360px",
4
4
  id: "3",
5
+ margin_bottom: "xl",
5
6
  background: false,
6
7
  filters: [
7
8
  { name: "name", value: "John Wick" },
@@ -37,8 +38,6 @@
37
38
  <% end %>
38
39
  <% end %>
39
40
 
40
- <br>
41
-
42
41
  <%=
43
42
  pb_rails("filter", props: {
44
43
  min_width: "360px",
@@ -17,6 +17,7 @@ const FilterNoBackground = (props) => {
17
17
  'Full Name': 'John Wick',
18
18
  'City': 'Las Vegas',
19
19
  }}
20
+ marginBottom="xl"
20
21
  minWidth="360px"
21
22
  results={3}
22
23
  sortOptions={{
@@ -6,16 +6,19 @@
6
6
  &[class*=_1] {
7
7
  @include pb_title_1;
8
8
  @include title_colors;
9
+ @include pb_title_bold;
9
10
  }
10
11
 
11
12
  &[class*=_2] {
12
13
  @include pb_title_2;
13
14
  @include title_colors;
15
+ @include pb_title_bold;
14
16
  }
15
17
 
16
18
  &[class*=_3] {
17
19
  @include pb_title_3;
18
20
  @include title_colors;
21
+ @include pb_title_bold;
19
22
  }
20
23
 
21
24
  &[class*=_4] {
@@ -26,4 +29,8 @@
26
29
  &.dark {
27
30
  @include pb_title_dark;
28
31
  }
32
+
33
+ &[class*=_thin] {
34
+ @include pb_title_thin;
35
+ }
29
36
  }
@@ -5,6 +5,7 @@ import { deprecatedProps, GlobalProps, globalProps } from '../utilities/globalPr
5
5
 
6
6
  type TitleProps = {
7
7
  aria?: {[key: string]: string},
8
+ bold?: boolean,
8
9
  children?: React.ReactChild[] | React.ReactChild,
9
10
  className?: string,
10
11
  color?: "default" | "light" | "lighter" | "success" | "error" | "link",
@@ -20,6 +21,7 @@ const Title = (props: TitleProps): React.ReactElement => {
20
21
  if (props.variant) deprecatedProps('Title', ['variant']) //variant prop is deprecated, use color instead
21
22
  const {
22
23
  aria = {},
24
+ bold = true,
23
25
  children,
24
26
  className,
25
27
  color,
@@ -33,8 +35,9 @@ const Title = (props: TitleProps): React.ReactElement => {
33
35
 
34
36
  const ariaProps: {[key: string]: string | number} = buildAriaProps(aria)
35
37
  const dataProps: {[key: string]: string | number} = buildDataProps(data)
38
+ const getBold = bold ? '' : 'thin'
36
39
  const classes = classnames(
37
- buildCss('pb_title_kit', `size_${size}`, variant, color),
40
+ buildCss('pb_title_kit', `size_${size}`, variant, color, getBold),
38
41
  globalProps(props),
39
42
  className,
40
43
  )
@@ -5,7 +5,7 @@
5
5
 
6
6
  <br/>
7
7
 
8
- <%= pb_rails("title", props: { text: "Title 4", tag: "h4", size: 4 }) %>
8
+ <%= pb_rails("title", props: { text: "Title 4", tag: "h4", size: 4 }) %>
9
9
  <%= pb_rails("title", props: { text: "Title 3", tag: "h3", size: 3 }) %>
10
10
  <%= pb_rails("title", props: { text: "Title 2", tag: "h2", size: 2 }) %>
11
11
  <%= pb_rails("title", props: { text: "Title 1", tag: "h1", size: 1 }) %>
@@ -2,7 +2,7 @@ import React from 'react'
2
2
 
3
3
  import Title from '../_title'
4
4
 
5
- const TitleLight = (props) => {
5
+ const TitleDefault = (props) => {
6
6
  return (
7
7
  <div>
8
8
  <Title
@@ -38,4 +38,4 @@ const TitleLight = (props) => {
38
38
  )
39
39
  }
40
40
 
41
- export default TitleLight
41
+ export default TitleDefault
@@ -0,0 +1,3 @@
1
+ <%= pb_rails("title", props: { text: "Title 3", tag: "h3", size: 3, bold: false }) %>
2
+ <%= pb_rails("title", props: { text: "Title 2", tag: "h2", size: 2, bold: false }) %>
3
+ <%= pb_rails("title", props: { text: "Title 1", tag: "h1", size: 1, bold: false }) %>
@@ -0,0 +1,33 @@
1
+ import React from 'react'
2
+
3
+ import Title from '../_title'
4
+
5
+ const TitleLightWeight = (props) => {
6
+ return (
7
+ <div>
8
+ <Title
9
+ bold={false}
10
+ size={3}
11
+ tag="h3"
12
+ text="Title 3"
13
+ {...props}
14
+ />
15
+ <Title
16
+ bold={false}
17
+ size={2}
18
+ tag="h2"
19
+ text="Title 2"
20
+ {...props}
21
+ />
22
+ <Title
23
+ bold={false}
24
+ size={1}
25
+ tag="h1"
26
+ text="Title 1"
27
+ {...props}
28
+ />
29
+ </div>
30
+ )
31
+ }
32
+
33
+ export default TitleLightWeight
@@ -0,0 +1,3 @@
1
+ ##### Prop
2
+ Title kit will use `font-weight: 700` by default, if you want a lighter font weight, use the `bold` prop set to `false`.
3
+ Title `size 4` uses a heavy font weight by default and will not accept a lighter font weight.
@@ -1,8 +1,10 @@
1
1
  examples:
2
2
  rails:
3
- - title_light: Light UI
3
+ - title_default: Default UI
4
+ - title_light_weight: Light Weight UI
4
5
  - title_colors: Colors
5
6
 
6
7
  react:
7
- - title_light: Light UI
8
+ - title_default: Default UI
9
+ - title_light_weight: Light Weight UI
8
10
  - title_colors: Colors
@@ -1,2 +1,3 @@
1
- export { default as TitleLight } from './_title_light.jsx'
1
+ export { default as TitleDefault } from './_title_default.jsx'
2
+ export { default as TitleLightWeight } from './_title_light_weight.jsx'
2
3
  export { default as TitleColors } from './_title_colors.jsx'
@@ -17,9 +17,14 @@ module Playbook
17
17
  values: [nil, "link"],
18
18
  default: nil,
19
19
  deprecated: true
20
+ prop :bold, type: Playbook::Props::Boolean, default: true
20
21
 
21
22
  def classname
22
- generate_classname("pb_title_kit", size, variant, color)
23
+ generate_classname("pb_title_kit", size, variant, color, is_bold)
24
+ end
25
+
26
+ def is_bold
27
+ bold ? nil : "thin"
23
28
  end
24
29
  end
25
30
  end
@@ -15,6 +15,19 @@ test('returns namespaced class name', () => {
15
15
  expect(kit).toHaveClass('pb_title_kit_size_3')
16
16
  })
17
17
 
18
+ test('with thin font weight', () => {
19
+ render(
20
+ <Title
21
+ bold={false}
22
+ data={{ testid: 'primary-test' }}
23
+ text="Test thin font weight"
24
+ />
25
+ )
26
+
27
+ const kit = screen.getByTestId('primary-test')
28
+ expect(kit).toHaveClass('pb_title_kit_size_3_thin')
29
+ })
30
+
18
31
  test('with colors', () => {
19
32
  render(
20
33
  <Title
@@ -31,8 +31,19 @@
31
31
 
32
32
  @mixin pb_title_4 {
33
33
  @include pb_title($heading_4, $bolder);
34
+ letter-spacing: -0.03em !important;
34
35
  }
35
36
 
36
37
  @mixin pb_title_dark {
37
38
  color: $text_dk_default;
38
39
  }
40
+
41
+ @mixin pb_title_bold {
42
+ font-weight: $bolder;
43
+ letter-spacing: 0em;
44
+ }
45
+
46
+ @mixin pb_title_thin {
47
+ font-weight: $lighter;
48
+ letter-spacing: $lspace_tight;
49
+ }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "11.9.0"
5
- VERSION = "11.10.0.pre.alpha.pagination1"
4
+ PREVIOUS_VERSION = "11.10.0"
5
+ VERSION = "11.10.0.pre.alpha-bold1"
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: 11.10.0.pre.alpha.pagination1
4
+ version: 11.10.0.pre.alpha.pre.bold1
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-10-26 00:00:00.000000000 Z
12
+ date: 2022-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -1433,12 +1433,6 @@ files:
1433
1433
  - app/pb_kits/playbook/pb_online_status/docs/index.js
1434
1434
  - app/pb_kits/playbook/pb_online_status/online_status.html.erb
1435
1435
  - app/pb_kits/playbook/pb_online_status/online_status.rb
1436
- - app/pb_kits/playbook/pb_pagination/_pagination.scss
1437
- - app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb
1438
- - app/pb_kits/playbook/pb_pagination/docs/_pagination_default.md
1439
- - app/pb_kits/playbook/pb_pagination/docs/example.yml
1440
- - app/pb_kits/playbook/pb_pagination/pagination.html.erb
1441
- - app/pb_kits/playbook/pb_pagination/pagination.rb
1442
1436
  - app/pb_kits/playbook/pb_passphrase/_passphrase.jsx
1443
1437
  - app/pb_kits/playbook/pb_passphrase/_passphrase.scss
1444
1438
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.html.erb
@@ -2001,9 +1995,12 @@ files:
2001
1995
  - app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb
2002
1996
  - app/pb_kits/playbook/pb_title/docs/_title_colors.jsx
2003
1997
  - app/pb_kits/playbook/pb_title/docs/_title_colors.md
2004
- - app/pb_kits/playbook/pb_title/docs/_title_light.html.erb
2005
- - app/pb_kits/playbook/pb_title/docs/_title_light.jsx
2006
- - app/pb_kits/playbook/pb_title/docs/_title_light.md
1998
+ - app/pb_kits/playbook/pb_title/docs/_title_default.html.erb
1999
+ - app/pb_kits/playbook/pb_title/docs/_title_default.jsx
2000
+ - app/pb_kits/playbook/pb_title/docs/_title_default.md
2001
+ - app/pb_kits/playbook/pb_title/docs/_title_light_weight.html.erb
2002
+ - app/pb_kits/playbook/pb_title/docs/_title_light_weight.jsx
2003
+ - app/pb_kits/playbook/pb_title/docs/_title_light_weight.md
2007
2004
  - app/pb_kits/playbook/pb_title/docs/example.yml
2008
2005
  - app/pb_kits/playbook/pb_title/docs/index.js
2009
2006
  - app/pb_kits/playbook/pb_title/title.html.erb
@@ -1,59 +0,0 @@
1
- @import "tokens/colors";
2
- @import "tokens/typography";
3
- @import "tokens/border_radius";
4
- @import "tokens/shadows";
5
-
6
- .pb_pagination {
7
- .pagination > li > a,
8
- .pagination > li > span {
9
- border: 0 !important;
10
- margin-top: 1px;
11
- margin-bottom: 1px;
12
- }
13
- .pagination > li:first-child > a,
14
- .pagination > li:first-child > span {
15
- border-right: 1px solid $border_light !important;
16
- z-index: 2;
17
- }
18
- .pagination > li:last-child > a,
19
- .pagination > li:last-child > span {
20
- border-left: 1px solid $border_light !important;
21
- z-index: 2;
22
- }
23
-
24
- .pagination {
25
- border: 1px solid $border_light;
26
- background-color: $white;
27
-
28
- a {
29
- color: $text_lt_default !important;
30
- font-size: $text_small;
31
- font-weight: $bold;
32
- border: none;
33
- margin-left: 1px;
34
- margin-right: 1px;
35
-
36
- &:hover {
37
- background-color: $active_light;
38
- color: $primary !important;
39
- border-radius: $border_rad_light;
40
- }
41
-
42
- &:focus {
43
- outline: 1px solid $primary !important;
44
- border-radius: $border_rad_light;
45
- outline-offset: -1px;
46
- }
47
- }
48
- .active > span {
49
- background-color: $primary;
50
- border-radius: $border_rad_light;
51
- margin-left: 1px;
52
- margin-right: 1px;
53
-
54
- &:hover {
55
- box-shadow: $shadow_deeper;
56
- }
57
- }
58
- }
59
- }
@@ -1 +0,0 @@
1
- <%= pb_rails("pagination") %>
@@ -1 +0,0 @@
1
- To apply our pagination CSS styles in rails, wrap the `will_paginate` component in our pagination component.
@@ -1,6 +0,0 @@
1
- examples:
2
-
3
- rails:
4
- - pagination_default: Default
5
-
6
-
@@ -1,7 +0,0 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id) do %>
6
- <%= content.presence %>
7
- <% end %>
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module PbPagination
5
- class Pagination < ::Playbook::KitBase
6
- def classname
7
- generate_classname("pb_pagination")
8
- end
9
- end
10
- end
11
- end