playbook_ui 12.25.0.pre.alpha.PLAY733DetailKit761 → 12.25.0.pre.alpha.play822bolddefaultfortitle3764

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/index.js +0 -1
  4. data/app/pb_kits/playbook/pb_title/_title.scss +1 -1
  5. data/app/pb_kits/playbook/pb_title/_title.tsx +2 -3
  6. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.html.erb +1 -0
  7. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.jsx +6 -0
  8. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.md +1 -2
  9. data/app/pb_kits/playbook/pb_title/title.rb +3 -10
  10. data/app/pb_kits/playbook/pb_title/title.test.js +3 -3
  11. data/app/pb_kits/playbook/playbook-doc.js +0 -2
  12. data/dist/menu.yml +0 -1
  13. data/dist/playbook-rails.js +1 -1
  14. data/lib/playbook/version.rb +1 -1
  15. metadata +1 -17
  16. data/app/pb_kits/playbook/pb_detail/_detail.scss +0 -44
  17. data/app/pb_kits/playbook/pb_detail/_detail.tsx +0 -51
  18. data/app/pb_kits/playbook/pb_detail/_detail_mixins.scss +0 -29
  19. data/app/pb_kits/playbook/pb_detail/detail.html.erb +0 -7
  20. data/app/pb_kits/playbook/pb_detail/detail.rb +0 -23
  21. data/app/pb_kits/playbook/pb_detail/detail.test.jsx +0 -33
  22. data/app/pb_kits/playbook/pb_detail/docs/_description.md +0 -1
  23. data/app/pb_kits/playbook/pb_detail/docs/_detail_bolded.html.erb +0 -33
  24. data/app/pb_kits/playbook/pb_detail/docs/_detail_bolded.jsx +0 -47
  25. data/app/pb_kits/playbook/pb_detail/docs/_detail_default.html.erb +0 -28
  26. data/app/pb_kits/playbook/pb_detail/docs/_detail_default.jsx +0 -43
  27. data/app/pb_kits/playbook/pb_detail/docs/_detail_default.md +0 -6
  28. data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.html.erb +0 -22
  29. data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.jsx +0 -32
  30. data/app/pb_kits/playbook/pb_detail/docs/example.yml +0 -11
  31. data/app/pb_kits/playbook/pb_detail/docs/index.js +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e2ca337968fddb4b7339377411e960bfe5a908c7236bd183a5cf1175abb1d45
4
- data.tar.gz: 1dae2d3a4a0e5af085133891b141a46806bc6245559dae96b474d27c6143f5b0
3
+ metadata.gz: 2f92b0ba0b6815c0e58e6245b7ab5c168f842a740774aae7f42157b772d47b65
4
+ data.tar.gz: 8b6d4937bdf2cd755f0787c25ab8743ea363381f05fcca13627b5363e1f484f0
5
5
  SHA512:
6
- metadata.gz: 7840f0f79113c13267b17e9cc6dc68058b8cd9abc24618caee84177c0b4baf168ee163f76bc847bdbec9b132190f01f80ff6107d9868a115a3793165899b11c1
7
- data.tar.gz: 22eeca8bbc3b6474277b8ae9adb61338b87a7537404a081fd707949559840dfbdf64a202eaa73d88ef81b100f3c45112153baebf9f495f5d8b3a64aaf532d61f
6
+ metadata.gz: 7ef87aa97ccafa5bd9291457af632c5710747f680e300b8ad56060a0b9b65c1ac22738079663831be6a2e9bd3a705a8f201be0b0a2826e28261d88541a70f80b
7
+ data.tar.gz: cbc07ce3495e7df2bccb5c40adc653b824de1506e0a64895ff632897529b4250232317278026ef9d9071071ff1ed4c8245ce514fdf6569162e8720d942c84da8
@@ -5,7 +5,6 @@
5
5
  @import 'pb_button_toolbar/button_toolbar';
6
6
  @import 'pb_caption/caption';
7
7
  @import 'pb_card/card';
8
- @import 'pb_detail/detail';
9
8
  @import 'pb_title/title';
10
9
  @import 'pb_avatar/avatar';
11
10
  @import 'pb_avatar_action_button/avatar_action_button';
@@ -31,7 +31,6 @@ export { default as DateStacked } from './pb_date_stacked/_date_stacked'
31
31
  export { default as DateTime } from './pb_date_time/_date_time'
32
32
  export { default as DateTimeStacked } from './pb_date_time_stacked/_date_time_stacked'
33
33
  export { default as DateYearStacked } from './pb_date_year_stacked/_date_year_stacked'
34
- export { default as Detail} from './pb_detail/_detail'
35
34
  export { default as Dialog } from './pb_dialog/_dialog'
36
35
  export { default as DistributionBar } from './pb_distribution_bar/_distribution_bar'
37
36
  export { default as FileUpload } from './pb_file_upload/_file_upload'
@@ -30,7 +30,7 @@
30
30
  @include pb_title_dark;
31
31
  }
32
32
 
33
- &[class*=thin] {
33
+ &[class*=_thin] {
34
34
  @include pb_title_thin;
35
35
  }
36
36
  }
@@ -27,7 +27,7 @@ const Title = (props: TitleProps): React.ReactElement => {
27
27
  data = {},
28
28
  id,
29
29
  size = 3,
30
- bold = size === 3 ? false : true,
30
+ bold = true,
31
31
  tag = 'h3',
32
32
  text,
33
33
  variant = null,
@@ -35,10 +35,9 @@ const Title = (props: TitleProps): React.ReactElement => {
35
35
 
36
36
  const ariaProps: {[key: string]: string | number} = buildAriaProps(aria)
37
37
  const dataProps: {[key: string]: string | number} = buildDataProps(data)
38
-
39
38
  const getBold = bold ? '' : 'thin'
40
39
  const classes = classnames(
41
- buildCss("pb_title_kit", `size_${size}`, variant, color) + ` ${getBold}`,
40
+ buildCss('pb_title_kit', `size_${size}`, variant, color, getBold),
42
41
  globalProps(props),
43
42
  className
44
43
  )
@@ -1,2 +1,3 @@
1
1
  <%= pb_rails("title", props: { text: "Title 1", tag: "h1", size: 1, bold: false }) %>
2
2
  <%= pb_rails("title", props: { text: "Title 2", tag: "h2", size: 2, bold: false }) %>
3
+ <%= pb_rails("title", props: { text: "Title 3", tag: "h3", size: 3, bold: false }) %>
@@ -17,6 +17,12 @@ const TitleLightWeight = (props) => {
17
17
  text='Title 2'
18
18
  {...props}
19
19
  />
20
+ <Title bold={false}
21
+ size={3}
22
+ tag='h2'
23
+ text='Title 3'
24
+ {...props}
25
+ />
20
26
  </div>
21
27
  )
22
28
  }
@@ -1,4 +1,3 @@
1
1
  ##### Prop
2
- Title `size 1` & `size 2` will use `font-weight: 700` by default, if you want a lighter font weight, use the `bold` prop set to `false`.
3
- Title `size 3` uses a light font weight by default and will not accept a bold font weight.
2
+ Title `size 1`, `size 2`, & `size 3` will use `font-weight: 700` by default, if you want a lighter font weight, use the `bold` prop set to `false`.
4
3
  Title `size 4` uses a heavy font weight by default and will not accept a lighter font weight.
@@ -17,21 +17,14 @@ module Playbook
17
17
  values: [nil, "link"],
18
18
  default: nil,
19
19
  deprecated: true
20
-
21
- def initialize(props)
22
- props[:bold] = [1, 2, 4].include?(props[:size]) unless props.key?(:bold)
23
- props[:bold] = false if props[:size].nil? && !props.key?(:bold)
24
- super(props)
25
- end
26
-
27
- prop :bold, type: Playbook::Props::Boolean
20
+ prop :bold, type: Playbook::Props::Boolean, default: true
28
21
 
29
22
  def classname
30
- generate_classname("pb_title_kit", size, variant, color) + is_bold
23
+ generate_classname("pb_title_kit", size, variant, color, is_bold)
31
24
  end
32
25
 
33
26
  def is_bold
34
- bold ? "" : " thin"
27
+ bold ? nil : "thin"
35
28
  end
36
29
  end
37
30
  end
@@ -12,7 +12,7 @@ test('returns namespaced class name', () => {
12
12
  )
13
13
 
14
14
  const kit = screen.getByTestId('primary-test')
15
- expect(kit).toHaveClass('pb_title_kit_size_3 thin')
15
+ expect(kit).toHaveClass('pb_title_kit_size_3')
16
16
  })
17
17
 
18
18
  test('with thin font weight', () => {
@@ -25,7 +25,7 @@ test('with thin font weight', () => {
25
25
  )
26
26
 
27
27
  const kit = screen.getByTestId('primary-test')
28
- expect(kit).toHaveClass('pb_title_kit_size_3 thin')
28
+ expect(kit).toHaveClass('pb_title_kit_size_3_thin')
29
29
  })
30
30
 
31
31
  test('with colors', () => {
@@ -38,5 +38,5 @@ test('with colors', () => {
38
38
  )
39
39
 
40
40
  const kit = screen.getByTestId('primary-test')
41
- expect(kit).toHaveClass('pb_title_kit_size_3_success thin')
41
+ expect(kit).toHaveClass('pb_title_kit_size_3_success')
42
42
  })
@@ -30,7 +30,6 @@ import * as DateStacked from 'pb_date_stacked/docs'
30
30
  import * as DateTime from 'pb_date_time/docs'
31
31
  import * as DateTimeStacked from 'pb_date_time_stacked/docs'
32
32
  import * as DateYearStacked from 'pb_date_year_stacked/docs'
33
- import * as Detail from 'pb_detail/docs'
34
33
  import * as Dialog from 'pb_dialog/docs'
35
34
  import * as DistributionBarDocs from 'pb_distribution_bar/docs'
36
35
  import * as FileUpload from 'pb_file_upload/docs'
@@ -131,7 +130,6 @@ WebpackerReact.setup({
131
130
  ...DateTime,
132
131
  ...DateTimeStacked,
133
132
  ...DateYearStacked,
134
- ...Detail,
135
133
  ...Dialog,
136
134
  ...DistributionBarDocs,
137
135
  ...FileUpload,
data/dist/menu.yml CHANGED
@@ -90,7 +90,6 @@ kits:
90
90
  - typography:
91
91
  - body
92
92
  - caption
93
- - detail
94
93
  - title
95
94
  - typography_patterns:
96
95
  - contact