playbook_ui 14.12.0.pre.alpha.playrailsinputmaskissue5933 → 14.12.0.pre.alpha.testingwithfas5686
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/pb_advanced_table/Components/CustomCell.tsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +4 -11
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +10 -9
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +21 -34
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +13 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading_react.md → _advanced_table_loading.md} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +6 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -14
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
- data/app/pb_kits/playbook/pb_button/button.rb +1 -1
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +1 -1
- data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +5 -7
- data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon/icon.rb +1 -1
- data/app/pb_kits/playbook/pb_icon/icon.test.js +8 -8
- data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
- data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
- data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
- data/app/pb_kits/playbook/pb_link/link.rb +0 -6
- data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
- data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +2 -2
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
- data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
- data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
- data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
- data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +1 -1
- data/app/pb_kits/playbook/pb_text_input/index.js +83 -52
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -3
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
- data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
- data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
- data/app/pb_kits/playbook/pb_user/user.rb +0 -1
- data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
- data/dist/chunks/_typeahead-DkuPTikq.js +36 -0
- data/dist/chunks/_weekday_stacked-DWgU5uIW.js +45 -0
- data/dist/chunks/{lib-DjpLC8uO.js → lib-kMuhBuU7.js} +1 -1
- data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-DBJ0wZuS.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -6
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/pb_forms_helper.rb +4 -13
- data/lib/playbook/version.rb +1 -1
- metadata +8 -32
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +0 -26
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +0 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +0 -4
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +0 -92
- data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
- data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -64
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
- data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
- data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
- data/dist/chunks/_typeahead-qhstadx9.js +0 -36
- data/dist/chunks/_weekday_stacked-CAHsfiaG.js +0 -45
- data/lib/playbook/pb_forms_global_props_helper.rb +0 -136
- /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close_react.md → _fixed_confirmation_toast_auto_close.md} +0 -0
@@ -14,7 +14,6 @@ type PbDateProps = {
|
|
14
14
|
alignment?: "left" | "center" | "right";
|
15
15
|
aria?: { [key: string]: string };
|
16
16
|
className?: string;
|
17
|
-
dark?: boolean;
|
18
17
|
data?: { [key: string]: string };
|
19
18
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
20
19
|
id?: string;
|
@@ -30,7 +29,6 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
30
29
|
aria = {},
|
31
30
|
alignment = "left",
|
32
31
|
className,
|
33
|
-
dark = false,
|
34
32
|
data = {},
|
35
33
|
htmlOptions = {},
|
36
34
|
id,
|
@@ -58,7 +56,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
58
56
|
);
|
59
57
|
|
60
58
|
return (
|
61
|
-
<div
|
59
|
+
<div
|
62
60
|
{...ariaProps}
|
63
61
|
{...dataProps}
|
64
62
|
{...htmlProps}
|
@@ -95,9 +93,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
95
93
|
</>
|
96
94
|
: size == "md" || size == "lg"
|
97
95
|
? (
|
98
|
-
<Title
|
99
|
-
dark={dark}
|
100
|
-
size={4}
|
96
|
+
<Title size={4}
|
101
97
|
tag="h4"
|
102
98
|
>
|
103
99
|
{showIcon && (
|
@@ -131,7 +127,6 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
131
127
|
<>
|
132
128
|
{showIcon && (
|
133
129
|
<Caption className="pb_icon_kit_container"
|
134
|
-
dark={dark}
|
135
130
|
tag="span"
|
136
131
|
>
|
137
132
|
<Icon fixedWidth
|
@@ -143,20 +138,15 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
|
|
143
138
|
|
144
139
|
{showDayOfWeek && (
|
145
140
|
<>
|
146
|
-
<Caption
|
147
|
-
tag="div">
|
148
|
-
{weekday}
|
149
|
-
</Caption>
|
141
|
+
<Caption tag="div">{weekday}</Caption>
|
150
142
|
<Caption color="light"
|
151
|
-
dark={dark}
|
152
143
|
tag="div"
|
153
144
|
text=" • "
|
154
145
|
/>
|
155
146
|
</>
|
156
147
|
)}
|
157
148
|
|
158
|
-
<Caption
|
159
|
-
tag="span">
|
149
|
+
<Caption tag="span">
|
160
150
|
{month} {day}
|
161
151
|
{currentYear != year && <>{`, ${year}`}</>}
|
162
152
|
</Caption>
|
@@ -18,7 +18,7 @@ const DateDefault = (props) => {
|
|
18
18
|
value={"2012-08-03"}
|
19
19
|
{...props}
|
20
20
|
/>
|
21
|
-
<Caption
|
21
|
+
<Caption>{"(Hyphenated Date)"}</Caption>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<br />
|
@@ -56,7 +56,6 @@ const DateDefault = (props) => {
|
|
56
56
|
<Title
|
57
57
|
size={4}
|
58
58
|
text={"(Hyphenated Date)"}
|
59
|
-
{...props}
|
60
59
|
/>
|
61
60
|
</div>
|
62
61
|
|
@@ -4,8 +4,7 @@ import { Caption, Date as FormattedDate, Title } from 'playbook-ui'
|
|
4
4
|
const DateUnstyled = (props) => {
|
5
5
|
return (
|
6
6
|
<>
|
7
|
-
<Caption
|
8
|
-
size="xs"
|
7
|
+
<Caption size="xs"
|
9
8
|
text="Basic unstyled example"
|
10
9
|
/>
|
11
10
|
<FormattedDate
|
@@ -16,14 +15,10 @@ const DateUnstyled = (props) => {
|
|
16
15
|
|
17
16
|
<br />
|
18
17
|
|
19
|
-
<Caption
|
20
|
-
|
21
|
-
size="xs"
|
18
|
+
<Caption size="xs"
|
22
19
|
text="Example with wrapping typography kit"
|
23
20
|
/>
|
24
|
-
<Title {
|
25
|
-
size={1}
|
26
|
-
>
|
21
|
+
<Title size={1}>
|
27
22
|
<FormattedDate
|
28
23
|
unstyled
|
29
24
|
value={new Date('25 Dec 1995')}
|
@@ -33,13 +28,10 @@ const DateUnstyled = (props) => {
|
|
33
28
|
|
34
29
|
<br />
|
35
30
|
|
36
|
-
<Caption
|
37
|
-
size="xs"
|
31
|
+
<Caption size="xs"
|
38
32
|
text="Example with icon + subcaption"
|
39
33
|
/>
|
40
|
-
<Caption
|
41
|
-
size="xs"
|
42
|
-
>
|
34
|
+
<Caption size="xs">
|
43
35
|
<FormattedDate
|
44
36
|
showDayOfWeek
|
45
37
|
showIcon
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag("div",
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("form_group", props: {cursor: "pointer", full_width: object.full_width}) do %>
|
3
8
|
<label
|
4
9
|
for="upload-<%= object.id %>"
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<%= object.wrapper do %>
|
3
7
|
<%= pb_rails("flex", props: { orientation: "row", padding_right: "lg", vertical: "center" }) do %>
|
4
8
|
<% if (object.template != "sort_only") %>
|
@@ -5,7 +5,6 @@ examples:
|
|
5
5
|
- fixed_confirmation_toast_multi_line: Multi Line
|
6
6
|
- fixed_confirmation_toast_close: Click to Close
|
7
7
|
- fixed_confirmation_toast_positions: Click to Show Positions
|
8
|
-
- fixed_confirmation_toast_auto_close: Click to Show Auto Close
|
9
8
|
- fixed_confirmation_toast_children: Children
|
10
9
|
- fixed_confirmation_toast_custom_icon: Custom Icon
|
11
10
|
|
@@ -2,18 +2,16 @@ import PbEnhancedElement from '../pb_enhanced_element'
|
|
2
2
|
|
3
3
|
export default class PbFixedConfirmationToast extends PbEnhancedElement {
|
4
4
|
static get selector() {
|
5
|
-
return '
|
5
|
+
return '.remove_toast'
|
6
6
|
}
|
7
7
|
|
8
8
|
connect() {
|
9
9
|
this.self = this.element
|
10
10
|
this.autoCloseToast(this.self)
|
11
11
|
|
12
|
-
|
13
|
-
this.self
|
14
|
-
|
15
|
-
})
|
16
|
-
}
|
12
|
+
this.self.addEventListener('click', () => {
|
13
|
+
this.removeToast(this.self)
|
14
|
+
})
|
17
15
|
}
|
18
16
|
|
19
17
|
removeToast(elem) {
|
@@ -34,4 +32,4 @@ export default class PbFixedConfirmationToast extends PbEnhancedElement {
|
|
34
32
|
}, autoCloseIntValue)
|
35
33
|
}
|
36
34
|
}
|
37
|
-
}
|
35
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div, id: object.id, data: object.data, class: object.classname + object.size_class, tabindex: object.tabindex, **combined_html_options) do %>
|
2
2
|
<% if object.name.present? %>
|
3
3
|
<%= pb_rails("avatar", props: { name: object.name, image_url: object.avatar_url, size: "xxs" }) %>
|
4
4
|
<% if object.truncate %>
|
@@ -33,7 +33,7 @@ module Playbook
|
|
33
33
|
default: nil
|
34
34
|
prop :font_style, type: Playbook::Props::Enum,
|
35
35
|
values: %w[far fas fab fak],
|
36
|
-
default: "
|
36
|
+
default: "fas"
|
37
37
|
prop :spin, type: Playbook::Props::Boolean,
|
38
38
|
default: false
|
39
39
|
prop :color, type: Playbook::Props::String
|
@@ -16,7 +16,7 @@ describe("Icon Kit", () => {
|
|
16
16
|
)
|
17
17
|
|
18
18
|
const kit = screen.getByTestId(testId)
|
19
|
-
expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw
|
19
|
+
expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fas")
|
20
20
|
})
|
21
21
|
|
22
22
|
test("renders rotate prop", () => {[
|
@@ -31,7 +31,7 @@ describe("Icon Kit", () => {
|
|
31
31
|
)
|
32
32
|
|
33
33
|
const kit = screen.getByTestId(testId)
|
34
|
-
expect(kit).toHaveClass(`fa-user pb_icon_kit fa-fw fa-rotate-${rotateProp}
|
34
|
+
expect(kit).toHaveClass(`fa-user pb_icon_kit fa-fw fa-rotate-${rotateProp} fas`)
|
35
35
|
|
36
36
|
cleanup()
|
37
37
|
})
|
@@ -48,7 +48,7 @@ describe("Icon Kit", () => {
|
|
48
48
|
)
|
49
49
|
|
50
50
|
const kit = screen.getByTestId(testId)
|
51
|
-
expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fa-flip-horizontal
|
51
|
+
expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fa-flip-horizontal fas")
|
52
52
|
})
|
53
53
|
|
54
54
|
|
@@ -63,7 +63,7 @@ describe("Icon Kit", () => {
|
|
63
63
|
)
|
64
64
|
|
65
65
|
const kit = screen.getByTestId(testId)
|
66
|
-
expect(kit).toHaveClass("fa-spinner pb_icon_kit fa-fw fa-spin
|
66
|
+
expect(kit).toHaveClass("fa-spinner pb_icon_kit fa-fw fa-spin fas")
|
67
67
|
})
|
68
68
|
|
69
69
|
test("renders pull icon", () => {
|
@@ -77,7 +77,7 @@ describe("Icon Kit", () => {
|
|
77
77
|
)
|
78
78
|
|
79
79
|
const kit = screen.getByTestId(testId)
|
80
|
-
expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left
|
80
|
+
expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left fas")
|
81
81
|
})
|
82
82
|
|
83
83
|
test("renders pull icon", () => {
|
@@ -91,7 +91,7 @@ describe("Icon Kit", () => {
|
|
91
91
|
)
|
92
92
|
|
93
93
|
const kit = screen.getByTestId(testId)
|
94
|
-
expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left
|
94
|
+
expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left fas")
|
95
95
|
})
|
96
96
|
|
97
97
|
test("renders border around icon", () => {
|
@@ -105,7 +105,7 @@ describe("Icon Kit", () => {
|
|
105
105
|
)
|
106
106
|
|
107
107
|
const kit = screen.getByTestId(testId)
|
108
|
-
expect(kit).toHaveClass("fa-user pb_icon_kit fa-border fa-fw
|
108
|
+
expect(kit).toHaveClass("fa-user pb_icon_kit fa-border fa-fw fas")
|
109
109
|
})
|
110
110
|
|
111
111
|
test("renders size prop", () => {
|
@@ -132,7 +132,7 @@ describe("Icon Kit", () => {
|
|
132
132
|
)
|
133
133
|
|
134
134
|
const kit = screen.getByTestId(testId)
|
135
|
-
expect(kit).toHaveClass(`pb_icon_kit fa-user fa-fw fa-${sizeProp}
|
135
|
+
expect(kit).toHaveClass(`pb_icon_kit fa-user fa-fw fa-${sizeProp} fas`)
|
136
136
|
|
137
137
|
cleanup()
|
138
138
|
})
|
@@ -19,9 +19,7 @@ type LinkProps = {
|
|
19
19
|
icon?: string,
|
20
20
|
iconRight?: string,
|
21
21
|
id?: string,
|
22
|
-
tabIndex?: number,
|
23
22
|
tag?: 'a' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
|
24
|
-
target?: string,
|
25
23
|
text?: string,
|
26
24
|
underline?: boolean,
|
27
25
|
} & GlobalProps
|
@@ -39,9 +37,7 @@ const Link = (props: LinkProps): React.ReactElement => {
|
|
39
37
|
icon = '',
|
40
38
|
iconRight = '',
|
41
39
|
id = '',
|
42
|
-
tabIndex,
|
43
40
|
tag = 'a',
|
44
|
-
target = '',
|
45
41
|
text = '',
|
46
42
|
underline = false,
|
47
43
|
} = props
|
@@ -56,14 +52,6 @@ const Link = (props: LinkProps): React.ReactElement => {
|
|
56
52
|
)
|
57
53
|
const Tag = tag as keyof JSX.IntrinsicElements
|
58
54
|
|
59
|
-
const getTargetAttribute = () => {
|
60
|
-
if (target && href) {
|
61
|
-
return target
|
62
|
-
}
|
63
|
-
|
64
|
-
return undefined
|
65
|
-
}
|
66
|
-
|
67
55
|
const renderContent = () => (
|
68
56
|
<>
|
69
57
|
{icon && (
|
@@ -99,9 +87,6 @@ const Link = (props: LinkProps): React.ReactElement => {
|
|
99
87
|
<a
|
100
88
|
{...commonProps}
|
101
89
|
href={href}
|
102
|
-
rel={target !== 'child' ? 'noreferrer' : undefined}
|
103
|
-
tabIndex={tabIndex}
|
104
|
-
target={getTargetAttribute()}
|
105
90
|
>
|
106
91
|
{renderContent()}
|
107
92
|
</a>
|
@@ -111,9 +96,6 @@ const Link = (props: LinkProps): React.ReactElement => {
|
|
111
96
|
<a
|
112
97
|
{...commonProps}
|
113
98
|
href={href}
|
114
|
-
rel={target !== 'child' ? 'noreferrer' : undefined}
|
115
|
-
tabIndex={tabIndex}
|
116
|
-
target={getTargetAttribute()}
|
117
99
|
>
|
118
100
|
<Tag>{renderContent()}</Tag>
|
119
101
|
</a>
|
@@ -1,18 +1,16 @@
|
|
1
1
|
examples:
|
2
|
-
|
2
|
+
|
3
3
|
rails:
|
4
4
|
- link_color: Color
|
5
5
|
- link_underline: Underline
|
6
6
|
- link_icon: Icon
|
7
7
|
- link_disabled: Disabled
|
8
8
|
- link_tag: Tag
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
|
10
|
+
|
12
11
|
react:
|
13
12
|
- link_color: Color
|
14
13
|
- link_underline: Underline
|
15
14
|
- link_icon: Icon
|
16
15
|
- link_disabled: Disabled
|
17
16
|
- link_tag: Tag
|
18
|
-
- link_target: Target
|
@@ -2,5 +2,4 @@ export { default as LinkColor } from './_link_color.jsx'
|
|
2
2
|
export { default as LinkUnderline } from './_link_underline.jsx'
|
3
3
|
export { default as LinkIcon } from './_link_icon.jsx'
|
4
4
|
export { default as LinkDisabled } from './_link_disabled.jsx'
|
5
|
-
export { default as LinkTag } from './_link_tag.jsx'
|
6
|
-
export { default as LinkTarget } from './_link_target.jsx'
|
5
|
+
export { default as LinkTag } from './_link_tag.jsx'
|
@@ -11,11 +11,9 @@ module Playbook
|
|
11
11
|
prop :href
|
12
12
|
prop :icon
|
13
13
|
prop :icon_right
|
14
|
-
prop :tabindex
|
15
14
|
prop :tag, type: Playbook::Props::Enum,
|
16
15
|
values: %w[a h1 h2 h3 h4 h5 h6 p span div],
|
17
16
|
default: "a"
|
18
|
-
prop :target
|
19
17
|
prop :text
|
20
18
|
prop :underline, type: Playbook::Props::Boolean,
|
21
19
|
default: false
|
@@ -28,10 +26,6 @@ module Playbook
|
|
28
26
|
text
|
29
27
|
end
|
30
28
|
|
31
|
-
def target_attribute
|
32
|
-
target if target && href
|
33
|
-
end
|
34
|
-
|
35
29
|
private
|
36
30
|
|
37
31
|
def color_class
|
@@ -90,33 +90,3 @@ test('adds icon right', () => {
|
|
90
90
|
const icon = kit.querySelector('.pb_icon_kit')
|
91
91
|
expect(icon).toBeInTheDocument();
|
92
92
|
})
|
93
|
-
|
94
|
-
test('should render target prop', () => {
|
95
|
-
render(
|
96
|
-
<Link
|
97
|
-
data={{ testid: 'target-test' }}
|
98
|
-
href="https://playbook.powerapp.cloud/"
|
99
|
-
target="blank"
|
100
|
-
/>
|
101
|
-
)
|
102
|
-
|
103
|
-
const kit = screen.getByTestId('target-test')
|
104
|
-
|
105
|
-
expect(kit).toHaveAttribute('target', 'blank')
|
106
|
-
})
|
107
|
-
|
108
|
-
|
109
|
-
test('should render child target prop', () => {
|
110
|
-
render(
|
111
|
-
<Link
|
112
|
-
data={{ testid: 'target-test' }}
|
113
|
-
href="https://playbook.powerapp.cloud/"
|
114
|
-
tabIndex={0}
|
115
|
-
target="child"
|
116
|
-
/>
|
117
|
-
)
|
118
|
-
|
119
|
-
const kit = screen.getByTestId('target-test')
|
120
|
-
|
121
|
-
expect(kit).toHaveAttribute('target', 'child')
|
122
|
-
})
|
@@ -95,11 +95,11 @@ test('should not have a left border', () => {
|
|
95
95
|
test('should have a right icon', () => {
|
96
96
|
render(<NavDefault iconRight="angle-down" />)
|
97
97
|
const kit = screen.getByTestId(itemTestId)
|
98
|
-
expect(kit).toContainHTML('<i class="pb_icon_kit
|
98
|
+
expect(kit).toContainHTML('<i class="pb_icon_kit fas pb_nav_list_item_icon_right fa-fw fa-angle-down" />')
|
99
99
|
})
|
100
100
|
|
101
101
|
test('should have a left icon', () => {
|
102
102
|
render(<NavDefault iconLeft="users-class" />)
|
103
103
|
const kit = screen.getByTestId(itemTestId)
|
104
|
-
expect(kit).toContainHTML('<i class="pb_icon_kit
|
104
|
+
expect(kit).toContainHTML('<i class="pb_icon_kit fas pb_nav_list_item_icon_left fa-fw fa-users-class" />')
|
105
105
|
})
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-1", tooltip: "Tooltip for step 1", tooltip_position: "right", step_direction: "horizontal" }) do %>
|
3
3
|
step 1
|
4
4
|
<% end %>
|
5
|
-
<%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-2", tooltip: "Tooltip for step 2",
|
5
|
+
<%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-2", tooltip: "Tooltip for step 2", step_direction: "horizontal" }) do %>
|
6
6
|
step 2
|
7
7
|
<% end %>
|
8
8
|
<%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-3", tooltip: "Tooltip for step 3", tooltip_position: "left", step_direction: "horizontal" }) do %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-4", tooltip: "Tooltip for step 4", tooltip_position: "bottom" }) do %>
|
12
12
|
step 4
|
13
13
|
<% end %>
|
14
|
-
<%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-5", tooltip: "Tooltip for step 5"
|
14
|
+
<%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-5", tooltip: "Tooltip for step 5" }) do %>
|
15
15
|
step 5
|
16
16
|
<% end %>
|
17
17
|
<% end %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<br /><br />
|
20
20
|
|
21
21
|
<%= pb_rails("progress_step", props: {orientation: "vertical"}) do %>
|
22
|
-
<%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-6", tooltip: "Tooltip step 1", step_direction: "vertical"
|
22
|
+
<%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-6", tooltip: "Tooltip step 1", step_direction: "vertical" }) do %>
|
23
23
|
<% end %>
|
24
24
|
<%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-7", tooltip: "Tooltip step 2", tooltip_position: "left"}) do %>
|
25
25
|
<% end %>
|
@@ -31,10 +31,10 @@
|
|
31
31
|
|
32
32
|
<br /><br>
|
33
33
|
<%= pb_rails("progress_step",props:{ variant:"tracker", icon:true}) do %>
|
34
|
-
<%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-10", tooltip: "The order has been received", step_direction: "horizontal" , tooltip_position: "right"
|
34
|
+
<%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-10", tooltip: "The order has been received", step_direction: "horizontal" , tooltip_position: "right" }) do %>
|
35
35
|
<%= pb_rails("caption", props:{text: "Ordered"})%>
|
36
36
|
<% end %>
|
37
|
-
<%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-11", tooltip:"Item(s) have been shipped"
|
37
|
+
<%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-11", tooltip:"Item(s) have been shipped" }) do %>
|
38
38
|
<%= pb_rails("caption", props:{text: "Shipped"})%>
|
39
39
|
<% end %>
|
40
40
|
<%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-12", tooltip:"This step has not been reached", tooltip_position: "left" }) do %>
|
@@ -50,7 +50,7 @@
|
|
50
50
|
<%= pb_rails("progress_step/progress_step_item", props: {status: "active", icon: "exclamation-triangle", classname: "tooltip-trigger-14", tooltip: "More details needed before shipment", tooltip_position: "bottom" }) do %>
|
51
51
|
<%= pb_rails("caption", props:{text: "Shipped"})%>
|
52
52
|
<% end %>
|
53
|
-
<%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-15", tooltip: "This step is inactive"
|
53
|
+
<%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-15", tooltip: "This step is inactive"}) do %>
|
54
54
|
<%= pb_rails("caption", props:{text: "Out for Delivery"})%>
|
55
55
|
<% end %>
|
56
56
|
<%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-16", tooltip: "Estimated delivery: Jun 27", tooltip_position: "left"}) do %>
|
@@ -39,17 +39,20 @@
|
|
39
39
|
</tr>
|
40
40
|
</tbody>
|
41
41
|
<% end %>
|
42
|
+
|
42
43
|
<%= pb_rails("table", props: { size: "sm", margin_bottom: "lg" }) do %>
|
43
44
|
<colgroup>
|
44
45
|
<%= pb_rails("background", props: { background_color: "error_subtle", tag: "col" }) %>
|
45
|
-
<%= pb_rails("background", props: { background_color: "
|
46
|
+
<%= pb_rails("background", props: { background_color: "card_light", tag: "col" }) %>
|
46
47
|
<%= pb_rails("background", props: { background_color: "warning_subtle", tag: "col" }) %>
|
47
48
|
</colgroup>
|
48
|
-
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
<%= pb_rails("background", props: { background_color: "card_light", tag: "thead" }) do %>
|
50
|
+
<tr>
|
51
|
+
<th>Column 1</th>
|
52
|
+
<th>Column 2</th>
|
53
|
+
<th>Column 3</th>
|
54
|
+
</tr>
|
55
|
+
<% end %>
|
53
56
|
<tbody>
|
54
57
|
<tr>
|
55
58
|
<td>Value 1</td>
|
@@ -68,7 +68,7 @@ const TableWithBackgroundKit = (props) => {
|
|
68
68
|
tag='col'
|
69
69
|
/>
|
70
70
|
<Background
|
71
|
-
backgroundColor="
|
71
|
+
backgroundColor="card_light"
|
72
72
|
tag='col'
|
73
73
|
/>
|
74
74
|
<Background
|
@@ -76,13 +76,16 @@ const TableWithBackgroundKit = (props) => {
|
|
76
76
|
tag='col'
|
77
77
|
/>
|
78
78
|
</colgroup>
|
79
|
-
<
|
79
|
+
<Background
|
80
|
+
backgroundColor="card_light"
|
81
|
+
tag='thead'
|
82
|
+
>
|
80
83
|
<tr>
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
+
<th>{'Column 1'}</th>
|
85
|
+
<th>{'Column 2'}</th>
|
86
|
+
<th>{'Column 3'}</th>
|
84
87
|
</tr>
|
85
|
-
</
|
88
|
+
</Background>
|
86
89
|
<tbody>
|
87
90
|
<tr>
|
88
91
|
<td>{'Value 1'}</td>
|
@@ -74,31 +74,6 @@
|
|
74
74
|
&.table-card {
|
75
75
|
background: none !important;
|
76
76
|
|
77
|
-
&.dark {
|
78
|
-
tbody, .pb_table_tbody {
|
79
|
-
tr, .pb_table_tr {
|
80
|
-
td, .pb_table_td {
|
81
|
-
background: $bg_dark_card !important;
|
82
|
-
border-color: $border_dark !important;
|
83
|
-
&:before {
|
84
|
-
color: $text_dk_light !important;
|
85
|
-
}
|
86
|
-
&:after {
|
87
|
-
height: 0;
|
88
|
-
background-color: transparent;
|
89
|
-
}
|
90
|
-
|
91
|
-
&:first-child {
|
92
|
-
border-radius: $border_rad_light $border_rad_light 0 0 !important;
|
93
|
-
}
|
94
|
-
&:last-child {
|
95
|
-
border-radius: 0 0 $border_rad_light $border_rad_light !important;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
77
|
tbody, .pb_table_tbody {
|
103
78
|
tr, .pb_table_tr {
|
104
79
|
td, .pb_table_td {
|
@@ -106,7 +81,6 @@
|
|
106
81
|
border-left-width: 1px !important;
|
107
82
|
border-right-width: 1px !important;
|
108
83
|
border-top-width: 1px !important;
|
109
|
-
|
110
84
|
&:after {
|
111
85
|
height: 0;
|
112
86
|
background-color: transparent;
|
@@ -74,31 +74,6 @@
|
|
74
74
|
&.table-card {
|
75
75
|
background: none !important;
|
76
76
|
|
77
|
-
&.dark {
|
78
|
-
tbody, .pb_table_tbody {
|
79
|
-
tr, .pb_table_tr {
|
80
|
-
td, .pb_table_td {
|
81
|
-
background: $bg_dark_card !important;
|
82
|
-
border-color: $border_dark !important;
|
83
|
-
&:before {
|
84
|
-
color: $text_dk_light !important;
|
85
|
-
}
|
86
|
-
&:after {
|
87
|
-
height: 0;
|
88
|
-
background-color: transparent;
|
89
|
-
}
|
90
|
-
|
91
|
-
&:first-child {
|
92
|
-
border-radius: $border_rad_light $border_rad_light 0 0 !important;
|
93
|
-
}
|
94
|
-
&:last-child {
|
95
|
-
border-radius: 0 0 $border_rad_light $border_rad_light !important;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
77
|
tbody, .pb_table_tbody {
|
103
78
|
tr, .pb_table_tr {
|
104
79
|
td, .pb_table_td {
|