playbook_ui 11.10.0.pre.alpha.pre.bold1 → 11.10.0
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_title/_title.scss +0 -7
- data/app/pb_kits/playbook/pb_title/_title.tsx +1 -4
- data/app/pb_kits/playbook/pb_title/docs/{_title_default.html.erb → _title_light.html.erb} +1 -1
- data/app/pb_kits/playbook/pb_title/docs/{_title_default.jsx → _title_light.jsx} +2 -2
- data/app/pb_kits/playbook/pb_title/docs/{_title_default.md → _title_light.md} +0 -0
- data/app/pb_kits/playbook/pb_title/docs/example.yml +2 -4
- data/app/pb_kits/playbook/pb_title/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_title/title.rb +1 -6
- data/app/pb_kits/playbook/pb_title/title.test.js +0 -13
- data/app/pb_kits/playbook/tokens/_titles.scss +0 -11
- data/lib/playbook/version.rb +2 -2
- metadata +7 -10
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.html.erb +0 -3
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.jsx +0 -33
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.md +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0cae07073769e635a2939918a0073c3b64119f9ded3a1390688945395ecbd9df
|
|
4
|
+
data.tar.gz: 38d8898737006ea27c5bcf4c2b65734dd1df5ef004a351638dc00015ca6bcbaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 787832d4132fb8a9373f06a684645f0945998476c5d5b2ab44718b0078eae552995cfe1d550a758a57f79d9a03267ffafee6882a5330fdf016d5c3a16f6a6ae2
|
|
7
|
+
data.tar.gz: a675526b2eec32a03c1f2409919a30deba79dfcd8bf3c06970c7153d35e4d37db4f665b0d66e05dc117e1937b2cbbb7a68b17b1e67f8555b7926c4c4c7cc7107
|
|
@@ -6,19 +6,16 @@
|
|
|
6
6
|
&[class*=_1] {
|
|
7
7
|
@include pb_title_1;
|
|
8
8
|
@include title_colors;
|
|
9
|
-
@include pb_title_bold;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
&[class*=_2] {
|
|
13
12
|
@include pb_title_2;
|
|
14
13
|
@include title_colors;
|
|
15
|
-
@include pb_title_bold;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
&[class*=_3] {
|
|
19
17
|
@include pb_title_3;
|
|
20
18
|
@include title_colors;
|
|
21
|
-
@include pb_title_bold;
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
&[class*=_4] {
|
|
@@ -29,8 +26,4 @@
|
|
|
29
26
|
&.dark {
|
|
30
27
|
@include pb_title_dark;
|
|
31
28
|
}
|
|
32
|
-
|
|
33
|
-
&[class*=_thin] {
|
|
34
|
-
@include pb_title_thin;
|
|
35
|
-
}
|
|
36
29
|
}
|
|
@@ -5,7 +5,6 @@ import { deprecatedProps, GlobalProps, globalProps } from '../utilities/globalPr
|
|
|
5
5
|
|
|
6
6
|
type TitleProps = {
|
|
7
7
|
aria?: {[key: string]: string},
|
|
8
|
-
bold?: boolean,
|
|
9
8
|
children?: React.ReactChild[] | React.ReactChild,
|
|
10
9
|
className?: string,
|
|
11
10
|
color?: "default" | "light" | "lighter" | "success" | "error" | "link",
|
|
@@ -21,7 +20,6 @@ const Title = (props: TitleProps): React.ReactElement => {
|
|
|
21
20
|
if (props.variant) deprecatedProps('Title', ['variant']) //variant prop is deprecated, use color instead
|
|
22
21
|
const {
|
|
23
22
|
aria = {},
|
|
24
|
-
bold = true,
|
|
25
23
|
children,
|
|
26
24
|
className,
|
|
27
25
|
color,
|
|
@@ -35,9 +33,8 @@ const Title = (props: TitleProps): React.ReactElement => {
|
|
|
35
33
|
|
|
36
34
|
const ariaProps: {[key: string]: string | number} = buildAriaProps(aria)
|
|
37
35
|
const dataProps: {[key: string]: string | number} = buildDataProps(data)
|
|
38
|
-
const getBold = bold ? '' : 'thin'
|
|
39
36
|
const classes = classnames(
|
|
40
|
-
buildCss('pb_title_kit', `size_${size}`, variant, color
|
|
37
|
+
buildCss('pb_title_kit', `size_${size}`, variant, color),
|
|
41
38
|
globalProps(props),
|
|
42
39
|
className,
|
|
43
40
|
)
|
|
@@ -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
|
|
5
|
+
const TitleLight = (props) => {
|
|
6
6
|
return (
|
|
7
7
|
<div>
|
|
8
8
|
<Title
|
|
@@ -38,4 +38,4 @@ const TitleDefault = (props) => {
|
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export default
|
|
41
|
+
export default TitleLight
|
|
File without changes
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
examples:
|
|
2
2
|
rails:
|
|
3
|
-
-
|
|
4
|
-
- title_light_weight: Light Weight UI
|
|
3
|
+
- title_light: Light UI
|
|
5
4
|
- title_colors: Colors
|
|
6
5
|
|
|
7
6
|
react:
|
|
8
|
-
-
|
|
9
|
-
- title_light_weight: Light Weight UI
|
|
7
|
+
- title_light: Light UI
|
|
10
8
|
- title_colors: Colors
|
|
@@ -17,14 +17,9 @@ module Playbook
|
|
|
17
17
|
values: [nil, "link"],
|
|
18
18
|
default: nil,
|
|
19
19
|
deprecated: true
|
|
20
|
-
prop :bold, type: Playbook::Props::Boolean, default: true
|
|
21
20
|
|
|
22
21
|
def classname
|
|
23
|
-
generate_classname("pb_title_kit", size, variant, color
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def is_bold
|
|
27
|
-
bold ? nil : "thin"
|
|
22
|
+
generate_classname("pb_title_kit", size, variant, color)
|
|
28
23
|
end
|
|
29
24
|
end
|
|
30
25
|
end
|
|
@@ -15,19 +15,6 @@ 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
|
-
|
|
31
18
|
test('with colors', () => {
|
|
32
19
|
render(
|
|
33
20
|
<Title
|
|
@@ -31,19 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
@mixin pb_title_4 {
|
|
33
33
|
@include pb_title($heading_4, $bolder);
|
|
34
|
-
letter-spacing: -0.03em !important;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
@mixin pb_title_dark {
|
|
38
37
|
color: $text_dk_default;
|
|
39
38
|
}
|
|
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
|
-
}
|
data/lib/playbook/version.rb
CHANGED
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
|
|
4
|
+
version: 11.10.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-10-
|
|
12
|
+
date: 2022-10-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: actionpack
|
|
@@ -1995,12 +1995,9 @@ files:
|
|
|
1995
1995
|
- app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb
|
|
1996
1996
|
- app/pb_kits/playbook/pb_title/docs/_title_colors.jsx
|
|
1997
1997
|
- app/pb_kits/playbook/pb_title/docs/_title_colors.md
|
|
1998
|
-
- app/pb_kits/playbook/pb_title/docs/
|
|
1999
|
-
- app/pb_kits/playbook/pb_title/docs/
|
|
2000
|
-
- app/pb_kits/playbook/pb_title/docs/
|
|
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
|
|
1998
|
+
- app/pb_kits/playbook/pb_title/docs/_title_light.html.erb
|
|
1999
|
+
- app/pb_kits/playbook/pb_title/docs/_title_light.jsx
|
|
2000
|
+
- app/pb_kits/playbook/pb_title/docs/_title_light.md
|
|
2004
2001
|
- app/pb_kits/playbook/pb_title/docs/example.yml
|
|
2005
2002
|
- app/pb_kits/playbook/pb_title/docs/index.js
|
|
2006
2003
|
- app/pb_kits/playbook/pb_title/title.html.erb
|
|
@@ -2324,9 +2321,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
2324
2321
|
version: '0'
|
|
2325
2322
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2326
2323
|
requirements:
|
|
2327
|
-
- - "
|
|
2324
|
+
- - ">="
|
|
2328
2325
|
- !ruby/object:Gem::Version
|
|
2329
|
-
version:
|
|
2326
|
+
version: '0'
|
|
2330
2327
|
requirements: []
|
|
2331
2328
|
rubygems_version: 3.3.7
|
|
2332
2329
|
signing_key:
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|