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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +0 -1
- data/app/pb_kits/playbook/index.js +0 -1
- data/app/pb_kits/playbook/pb_title/_title.scss +1 -1
- data/app/pb_kits/playbook/pb_title/_title.tsx +2 -3
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.html.erb +1 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.jsx +6 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.md +1 -2
- data/app/pb_kits/playbook/pb_title/title.rb +3 -10
- data/app/pb_kits/playbook/pb_title/title.test.js +3 -3
- data/app/pb_kits/playbook/playbook-doc.js +0 -2
- data/dist/menu.yml +0 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +1 -17
- data/app/pb_kits/playbook/pb_detail/_detail.scss +0 -44
- data/app/pb_kits/playbook/pb_detail/_detail.tsx +0 -51
- data/app/pb_kits/playbook/pb_detail/_detail_mixins.scss +0 -29
- data/app/pb_kits/playbook/pb_detail/detail.html.erb +0 -7
- data/app/pb_kits/playbook/pb_detail/detail.rb +0 -23
- data/app/pb_kits/playbook/pb_detail/detail.test.jsx +0 -33
- data/app/pb_kits/playbook/pb_detail/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_detail/docs/_detail_bolded.html.erb +0 -33
- data/app/pb_kits/playbook/pb_detail/docs/_detail_bolded.jsx +0 -47
- data/app/pb_kits/playbook/pb_detail/docs/_detail_default.html.erb +0 -28
- data/app/pb_kits/playbook/pb_detail/docs/_detail_default.jsx +0 -43
- data/app/pb_kits/playbook/pb_detail/docs/_detail_default.md +0 -6
- data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.html.erb +0 -22
- data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.jsx +0 -32
- data/app/pb_kits/playbook/pb_detail/docs/example.yml +0 -11
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f92b0ba0b6815c0e58e6245b7ab5c168f842a740774aae7f42157b772d47b65
|
4
|
+
data.tar.gz: 8b6d4937bdf2cd755f0787c25ab8743ea363381f05fcca13627b5363e1f484f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ef87aa97ccafa5bd9291457af632c5710747f680e300b8ad56060a0b9b65c1ac22738079663831be6a2e9bd3a705a8f201be0b0a2826e28261d88541a70f80b
|
7
|
+
data.tar.gz: cbc07ce3495e7df2bccb5c40adc653b824de1506e0a64895ff632897529b4250232317278026ef9d9071071ff1ed4c8245ce514fdf6569162e8720d942c84da8
|
@@ -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'
|
@@ -27,7 +27,7 @@ const Title = (props: TitleProps): React.ReactElement => {
|
|
27
27
|
data = {},
|
28
28
|
id,
|
29
29
|
size = 3,
|
30
|
-
bold =
|
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(
|
40
|
+
buildCss('pb_title_kit', `size_${size}`, variant, color, getBold),
|
42
41
|
globalProps(props),
|
43
42
|
className
|
44
43
|
)
|
@@ -1,4 +1,3 @@
|
|
1
1
|
##### Prop
|
2
|
-
Title `size 1` & `size
|
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
|
23
|
+
generate_classname("pb_title_kit", size, variant, color, is_bold)
|
31
24
|
end
|
32
25
|
|
33
26
|
def is_bold
|
34
|
-
bold ?
|
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
|
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('
|
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
|
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,
|