playbook_ui 12.24.0.pre.alpha.play833boldoptionfortitle2and3721 → 12.24.0.pre.alpha.railsmultilevelimprovements739
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/pb_docs/kit_example.rb +0 -2
- data/app/pb_kits/playbook/pb_title/_title.scss +1 -2
- data/app/pb_kits/playbook/pb_title/_title.tsx +2 -3
- data/app/pb_kits/playbook/pb_title/title.rb +3 -10
- data/app/pb_kits/playbook/pb_title/title.test.js +3 -3
- data/dist/playbook-rails.js +51 -0
- data/lib/playbook/forms/builder/multi_level_select_field.rb +12 -0
- data/lib/playbook/forms/builder.rb +2 -0
- data/lib/playbook/version.rb +1 -1
- data/lib/playbook.rb +1 -2
- metadata +8 -36
- data/app/pb_kits/playbook/pb_docs/kit_api.html.erb +0 -311
- data/app/pb_kits/playbook/pb_docs/kit_api.rb +0 -149
- data/lib/playbook/markdown/helper.rb +0 -132
- data/lib/playbook/markdown.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca13d82593114ee6fa9797c521e2e7da4b675f48923d7ad41c74fc14d5d224d6
|
4
|
+
data.tar.gz: 8f1309ad083e6e90c2a6278b7f3afb4cdcea79e06dcfbb7481ae9273d4f9f6ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f1e03060911871628a3c79d92bb7c01fbedf754b705a2feefe065082b03dca4bde92bec88d390a508639a1e5ac1f157d0130775cf6056d55260beae9b149c18
|
7
|
+
data.tar.gz: 0ce1d542f2d0a41150fb52757501f9423392495c0554b5757330c178db347168973bb55f41fd86e017dee8475d27545f58332d60609667ec727d17da63241583
|
@@ -5,8 +5,6 @@
|
|
5
5
|
module Playbook
|
6
6
|
module PbDocs
|
7
7
|
class KitExample < Playbook::KitBase
|
8
|
-
include Playbook::Markdown::Helper
|
9
|
-
|
10
8
|
prop :kit, type: Playbook::Props::String, required: true
|
11
9
|
prop :example_title, type: Playbook::Props::String, required: true
|
12
10
|
prop :example_key, type: Playbook::Props::String, required: true
|
@@ -18,7 +18,6 @@
|
|
18
18
|
&[class*=_3] {
|
19
19
|
@include pb_title_3;
|
20
20
|
@include title_colors;
|
21
|
-
@include pb_title_bold;
|
22
21
|
}
|
23
22
|
|
24
23
|
&[class*=_4] {
|
@@ -30,7 +29,7 @@
|
|
30
29
|
@include pb_title_dark;
|
31
30
|
}
|
32
31
|
|
33
|
-
&[class*=
|
32
|
+
&[class*=_thin] {
|
34
33
|
@include pb_title_thin;
|
35
34
|
}
|
36
35
|
}
|
@@ -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,
|
24
25
|
children,
|
25
26
|
className,
|
26
27
|
color,
|
27
28
|
data = {},
|
28
29
|
id,
|
29
30
|
size = 3,
|
30
|
-
bold = size === 3 ? false : 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
|
)
|
@@ -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
|
})
|