playbook_ui 12.24.0.pre.alpha.alphatestforselfhostfak720 → 12.24.0.pre.alpha.play833boldoptionfortitle2and3717

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3b13169f586e341df32591e1f4eb45be130542c63cd46fe75eb5531c4bbf24f
4
- data.tar.gz: 83c4990a0869cc25b21de2b66fc9a9e75c795c0c0059dc74b36c2ce4120610e7
3
+ metadata.gz: e94d873152c1cc2e61164252945bf8886d4f8d78f9f7171d88c2c1122fd2a773
4
+ data.tar.gz: 5ef03ff135408bcfa5ad9a487be278bbbb2d96030c0da367a85ed4446c76ea30
5
5
  SHA512:
6
- metadata.gz: 60b9622512359115f3de5947c595579c1b017f2796602cbc2bf4fd70fc8f3289290edb4689db5fbdb41d9d00c9949824f75842f6815b4fefaaa3ad8e29b64e9b
7
- data.tar.gz: 44815fdcd43a9648420d85d9bebee3a167f7b22841ced941637c4f989d7b6c0d18f06f1398ca8083e5f0e81093ee8d01342782b6d19e618a85818ab7fa2be71b
6
+ metadata.gz: 68709ae639291c9b472725adfef76aeac599bdf467ebd4a113a7933f4d6a7d4d3a234cf8eff64eaa8b7fcbaf6fb9efb25992a0f99e2b6de05d515753604fd1d5
7
+ data.tar.gz: 73908e6af09435d622d57a90a211da2d7e353fbb94ec6490f41650ebe8032a1fe233068e6baf2e4687fe04d45f4020516eadd0e45375f86f9d47fb2094fc949e
@@ -34,7 +34,7 @@ type IconProps = {
34
34
  pulse?: boolean,
35
35
  rotation?: 90 | 180 | 270,
36
36
  size?: IconSizes,
37
- fontStyle?: 'far' | 'fas' | 'fab' | 'fak',
37
+ fontStyle?: 'far' | 'fas' | 'fab',
38
38
  spin?: boolean,
39
39
  } & GlobalProps
40
40
 
@@ -33,7 +33,7 @@ module Playbook
33
33
  values: ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x", nil],
34
34
  default: nil
35
35
  prop :font_style, type: Playbook::Props::Enum,
36
- values: %w[far fas fab fak],
36
+ values: %w[far fas fab],
37
37
  default: "far"
38
38
  prop :spin, type: Playbook::Props::Boolean,
39
39
  default: false
@@ -18,6 +18,7 @@
18
18
  &[class*=_3] {
19
19
  @include pb_title_3;
20
20
  @include title_colors;
21
+ @include pb_title_bold;
21
22
  }
22
23
 
23
24
  &[class*=_4] {
@@ -21,13 +21,13 @@ const Title = (props: TitleProps): React.ReactElement => {
21
21
  if (props.variant) deprecatedProps('Title', ['variant']) //variant prop is deprecated, use color instead
22
22
  const {
23
23
  aria = {},
24
- bold = true,
25
24
  children,
26
25
  className,
27
26
  color,
28
27
  data = {},
29
28
  id,
30
29
  size = 3,
30
+ bold = size === 3 ? false : true,
31
31
  tag = 'h3',
32
32
  text,
33
33
  variant = null,
@@ -35,6 +35,7 @@ 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
+
38
39
  const getBold = bold ? '' : 'thin'
39
40
  const classes = classnames(
40
41
  buildCss('pb_title_kit', `size_${size}`, variant, color, getBold),
@@ -7,5 +7,5 @@
7
7
 
8
8
  <%= pb_rails("title", props: { text: "Title 1", tag: "h1", size: 1 }) %>
9
9
  <%= pb_rails("title", props: { text: "Title 2", tag: "h2", size: 2 }) %>
10
- <%= pb_rails("title", props: { text: "Title 3", tag: "h3", size: 3 }) %>
10
+ <%= pb_rails("title", props: { text: "Title 3", tag: "h3", size: 3, color: "success"}) %>
11
11
  <%= pb_rails("title", props: { text: "Title 4", tag: "h4", size: 4 }) %>
@@ -17,7 +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
+ 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
21
28
 
22
29
  def classname
23
30
  generate_classname("pb_title_kit", size, variant, color, is_bold)
@@ -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')
15
+ expect(kit).toHaveClass('pb_title_kit_size_3_thin')
16
16
  })
17
17
 
18
18
  test('with thin font weight', () => {
@@ -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')
41
+ expect(kit).toHaveClass('pb_title_kit_size_3_success_thin')
42
42
  })
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "12.24.0"
5
- VERSION = "12.24.0.pre.alpha.alphatestforselfhostfak720"
5
+ VERSION = "12.24.0.pre.alpha.play833boldoptionfortitle2and3717"
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: 12.24.0.pre.alpha.alphatestforselfhostfak720
4
+ version: 12.24.0.pre.alpha.play833boldoptionfortitle2and3717
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: 2023-06-01 00:00:00.000000000 Z
12
+ date: 2023-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack