playbook_ui 11.4.0.pre.alpha.rubytheme2 → 11.4.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_date/_date.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_time/{_date_time.tsx → _date_time.jsx} +5 -2
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_align.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/_dialog.jsx +14 -32
- data/app/pb_kits/playbook/pb_dialog/_dialog.scss +0 -5
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.jsx +2 -2
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx +4 -22
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.jsx +3 -3
- data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +17 -79
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.jsx +93 -55
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +42 -79
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -10
- data/app/pb_kits/playbook/pb_hashtag/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_hashtag/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_hashtag/hashtag.html.erb +1 -1
- data/app/pb_kits/playbook/pb_hashtag/hashtag.rb +0 -6
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +0 -3
- data/app/pb_kits/playbook/pb_home_address_street/city_emphasis.html.erb +1 -2
- data/app/pb_kits/playbook/pb_home_address_street/city_emphasis.rb +0 -2
- data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +0 -4
- data/app/pb_kits/playbook/pb_home_address_street/street_emphasis.html.erb +1 -2
- data/app/pb_kits/playbook/pb_home_address_street/street_emphasis.rb +1 -4
- data/app/pb_kits/playbook/pb_time/_time.tsx +2 -2
- data/app/pb_kits/playbook/tokens/_colors.scss +74 -74
- data/app/pb_kits/playbook/tokens/_typography.scss +8 -8
- data/lib/playbook/version.rb +2 -2
- metadata +6 -14
- data/app/pb_kits/playbook/pb_date_time/dateTime.test.js +0 -110
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.html.erb +0 -5
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.jsx +0 -26
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.md +0 -1
- data/app/pb_kits/playbook/pb_hashtag/hashtag.test.js +0 -54
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb +0 -12
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx +0 -23
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md +0 -1
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.4.0
|
4
|
+
version: 11.4.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-
|
12
|
+
date: 2022-08-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -750,9 +750,8 @@ files:
|
|
750
750
|
- app/pb_kits/playbook/pb_date_stacked/docs/_footer.md
|
751
751
|
- app/pb_kits/playbook/pb_date_stacked/docs/example.yml
|
752
752
|
- app/pb_kits/playbook/pb_date_stacked/docs/index.js
|
753
|
+
- app/pb_kits/playbook/pb_date_time/_date_time.jsx
|
753
754
|
- app/pb_kits/playbook/pb_date_time/_date_time.scss
|
754
|
-
- app/pb_kits/playbook/pb_date_time/_date_time.tsx
|
755
|
-
- app/pb_kits/playbook/pb_date_time/dateTime.test.js
|
756
755
|
- app/pb_kits/playbook/pb_date_time/date_time.html.erb
|
757
756
|
- app/pb_kits/playbook/pb_date_time/date_time.rb
|
758
757
|
- app/pb_kits/playbook/pb_date_time/docs/_date_time_align.html.erb
|
@@ -1013,14 +1012,10 @@ files:
|
|
1013
1012
|
- app/pb_kits/playbook/pb_hashtag/docs/_footer.md
|
1014
1013
|
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.html.erb
|
1015
1014
|
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.jsx
|
1016
|
-
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.html.erb
|
1017
|
-
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.jsx
|
1018
|
-
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.md
|
1019
1015
|
- app/pb_kits/playbook/pb_hashtag/docs/example.yml
|
1020
1016
|
- app/pb_kits/playbook/pb_hashtag/docs/index.js
|
1021
1017
|
- app/pb_kits/playbook/pb_hashtag/hashtag.html.erb
|
1022
1018
|
- app/pb_kits/playbook/pb_hashtag/hashtag.rb
|
1023
|
-
- app/pb_kits/playbook/pb_hashtag/hashtag.test.js
|
1024
1019
|
- app/pb_kits/playbook/pb_highlight/_highlight.scss
|
1025
1020
|
- app/pb_kits/playbook/pb_highlight/_highlight.tsx
|
1026
1021
|
- app/pb_kits/playbook/pb_highlight/docs/_description.md
|
@@ -1043,9 +1038,6 @@ files:
|
|
1043
1038
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb
|
1044
1039
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx
|
1045
1040
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md
|
1046
|
-
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb
|
1047
|
-
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx
|
1048
|
-
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md
|
1049
1041
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified.html.erb
|
1050
1042
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified.jsx
|
1051
1043
|
- app/pb_kits/playbook/pb_home_address_street/docs/example.yml
|
@@ -2274,11 +2266,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2274
2266
|
version: '0'
|
2275
2267
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2276
2268
|
requirements:
|
2277
|
-
- - "
|
2269
|
+
- - ">="
|
2278
2270
|
- !ruby/object:Gem::Version
|
2279
|
-
version:
|
2271
|
+
version: '0'
|
2280
2272
|
requirements: []
|
2281
|
-
rubygems_version: 3.3.
|
2273
|
+
rubygems_version: 3.3.7
|
2282
2274
|
signing_key:
|
2283
2275
|
specification_version: 4
|
2284
2276
|
summary: Playbook Design System
|
@@ -1,110 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { render, screen } from '../utilities/test-utils'
|
3
|
-
|
4
|
-
import DateTime from './_date_time'
|
5
|
-
|
6
|
-
const TEST_DATE = '01/01/2020 00:00:000 GMT-0500'
|
7
|
-
jest.setSystemTime(new Date(TEST_DATE));
|
8
|
-
const testId = 'datetime-kit'
|
9
|
-
|
10
|
-
const realDate = Date
|
11
|
-
|
12
|
-
beforeEach(() => {
|
13
|
-
global.Date.now = jest.fn(() => new Date(TEST_DATE).getTime());
|
14
|
-
})
|
15
|
-
|
16
|
-
afterEach(() => {
|
17
|
-
global.Date = realDate;
|
18
|
-
})
|
19
|
-
|
20
|
-
describe('DateTime Kit', () => {
|
21
|
-
test('renders DatePicker className', () => {
|
22
|
-
render(
|
23
|
-
<DateTime
|
24
|
-
data={{ testid: testId }}
|
25
|
-
datetime={new Date(Date.now())}
|
26
|
-
showDayOfWeek
|
27
|
-
showIcon
|
28
|
-
/>
|
29
|
-
)
|
30
|
-
|
31
|
-
const kit = screen.getByTestId(testId)
|
32
|
-
expect(kit).toHaveClass('pb_date_time_md')
|
33
|
-
})
|
34
|
-
test('renders DatePicker text left', () => {
|
35
|
-
render(
|
36
|
-
<DateTime
|
37
|
-
data={{ testid: testId }}
|
38
|
-
datetime={new Date(Date.now())}
|
39
|
-
showDayOfWeek
|
40
|
-
showIcon
|
41
|
-
/>
|
42
|
-
)
|
43
|
-
|
44
|
-
const kit = screen.getByTestId(testId)
|
45
|
-
const text = kit.querySelector('.pb_date_kit_left')
|
46
|
-
expect(text.textContent).toEqual('Wed • Jan 1')
|
47
|
-
})
|
48
|
-
test('renders DatePicker text right', () => {
|
49
|
-
render(
|
50
|
-
<DateTime
|
51
|
-
data={{ testid: testId }}
|
52
|
-
datetime={new Date(Date.now())}
|
53
|
-
showDayOfWeek
|
54
|
-
showIcon
|
55
|
-
/>
|
56
|
-
)
|
57
|
-
|
58
|
-
const kit = screen.getByTestId(testId)
|
59
|
-
const text = kit.querySelector('.pb_time_kit_md.ml_sm')
|
60
|
-
const clock = kit.querySelector('.pb_icon_kit.far.fa-fw.fa-clock')
|
61
|
-
|
62
|
-
expect(clock).toBeInTheDocument()
|
63
|
-
expect(text.textContent).toEqual(' 12:00a EST')
|
64
|
-
})
|
65
|
-
test('renders DatePicker text right no icon', () => {
|
66
|
-
render(
|
67
|
-
<DateTime
|
68
|
-
data={{ testid: testId }}
|
69
|
-
datetime={new Date(Date.now())}
|
70
|
-
showDayOfWeek
|
71
|
-
/>
|
72
|
-
)
|
73
|
-
|
74
|
-
const kit = screen.getByTestId(testId)
|
75
|
-
const clock = kit.querySelector('.pb_icon_kit.far.fa-fw.fa-clock')
|
76
|
-
|
77
|
-
expect(clock).toBeNull()
|
78
|
-
})
|
79
|
-
test('renders DatePicker text right timezone', () => {
|
80
|
-
render(
|
81
|
-
<DateTime
|
82
|
-
data={{ testid: testId }}
|
83
|
-
datetime={new Date(Date.now())}
|
84
|
-
showDayOfWeek
|
85
|
-
timeZone="Asia/Tokyo"
|
86
|
-
/>
|
87
|
-
)
|
88
|
-
|
89
|
-
const kit = screen.getByTestId(testId)
|
90
|
-
const text = kit.querySelector('.pb_time_kit_md.ml_sm')
|
91
|
-
|
92
|
-
expect(text.textContent).toEqual('2:00p JST')
|
93
|
-
})
|
94
|
-
test('renders DatePicker size', () => {
|
95
|
-
render(
|
96
|
-
<DateTime
|
97
|
-
data={{ testid: testId }}
|
98
|
-
datetime={new Date(Date.now())}
|
99
|
-
showDayOfWeek
|
100
|
-
size="sm"
|
101
|
-
/>
|
102
|
-
)
|
103
|
-
|
104
|
-
const kit = screen.getByTestId(testId)
|
105
|
-
const rightSide = kit.querySelector('.pb_time_kit_sm.ml_sm')
|
106
|
-
|
107
|
-
expect(kit).toHaveClass('pb_date_time_sm')
|
108
|
-
expect(rightSide).toBeInTheDocument()
|
109
|
-
})
|
110
|
-
})
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Hashtag } from '../../'
|
3
|
-
|
4
|
-
const HashtagLink = (props) => {
|
5
|
-
return (
|
6
|
-
<div>
|
7
|
-
<Hashtag
|
8
|
-
text="Open in the same window"
|
9
|
-
type="project"
|
10
|
-
url="https://google.com"
|
11
|
-
{...props}
|
12
|
-
/>
|
13
|
-
<br />
|
14
|
-
<br />
|
15
|
-
<Hashtag
|
16
|
-
newWindow
|
17
|
-
text="Open in a new window"
|
18
|
-
type="project"
|
19
|
-
url="https://google.com"
|
20
|
-
{...props}
|
21
|
-
/>
|
22
|
-
</div>
|
23
|
-
)
|
24
|
-
}
|
25
|
-
|
26
|
-
export default HashtagLink
|
@@ -1 +0,0 @@
|
|
1
|
-
Use the newWindow/new_window prop to control whether the link opens on the same page or a new tab (same page is the default behavior)
|
@@ -1,54 +0,0 @@
|
|
1
|
-
|
2
|
-
import React from 'react'
|
3
|
-
import { render, screen, cleanup } from "../utilities/test-utils";
|
4
|
-
|
5
|
-
import { Hashtag } from "..";
|
6
|
-
|
7
|
-
|
8
|
-
const testId = "primary-test"
|
9
|
-
const text="Open in a new window"
|
10
|
-
const type="project"
|
11
|
-
const url="https://google.com"
|
12
|
-
const typeMap = {
|
13
|
-
home: 'H#',
|
14
|
-
project: 'P#',
|
15
|
-
appointment: 'A#',
|
16
|
-
default: '#',
|
17
|
-
}
|
18
|
-
|
19
|
-
function HashtagTest(props) {
|
20
|
-
return (
|
21
|
-
<Hashtag
|
22
|
-
data={{ testid: testId }}
|
23
|
-
text={text}
|
24
|
-
type={type}
|
25
|
-
url={url}
|
26
|
-
{...props}
|
27
|
-
/>
|
28
|
-
);
|
29
|
-
}
|
30
|
-
|
31
|
-
test("renders the component", () => {
|
32
|
-
render(<HashtagTest/>);
|
33
|
-
const kit = screen.getByTestId("primary-test");
|
34
|
-
expect(kit).toBeInTheDocument();
|
35
|
-
expect(kit).toHaveClass("pb_hashtag_kit");
|
36
|
-
|
37
|
-
cleanup()
|
38
|
-
});
|
39
|
-
|
40
|
-
test("should pass in url property and allow links to open in a new window", () => {
|
41
|
-
const { container } = render(<HashtagTest newWindow />);
|
42
|
-
expect(container.getElementsByClassName("pb_hashtag_kit")[0].firstChild).toHaveAttribute("href", url);
|
43
|
-
expect(container.getElementsByClassName("pb_hashtag_kit")[0].firstChild).toHaveAttribute("target", "_blank");
|
44
|
-
|
45
|
-
cleanup()
|
46
|
-
});
|
47
|
-
|
48
|
-
test("renders the badge kit with appropriate text", () => {
|
49
|
-
const { container } = render(<HashtagTest />);
|
50
|
-
expect(container.getElementsByClassName("pb_badge_kit_primary")[0]).toBeInTheDocument;
|
51
|
-
expect(container.getElementsByClassName("pb_badge_kit_primary")[0]).toHaveTextContent(typeMap[type] + text);
|
52
|
-
|
53
|
-
cleanup()
|
54
|
-
});
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<%= pb_rails("home_address_street", props: {
|
2
|
-
address: "70 Prospect Ave",
|
3
|
-
address_cont: "Apt M18",
|
4
|
-
city: "West Chester",
|
5
|
-
home_id: 8250263,
|
6
|
-
home_url: "https://powerhrg.com/",
|
7
|
-
house_style: "Colonial",
|
8
|
-
new_window: true,
|
9
|
-
state: "PA",
|
10
|
-
zipcode: "19382",
|
11
|
-
territory: "PHL",
|
12
|
-
}) %>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
import HomeAddressStreet from '../_home_address_street'
|
4
|
-
|
5
|
-
const HomeAddressStreetLink= (props) => {
|
6
|
-
return (
|
7
|
-
<HomeAddressStreet
|
8
|
-
address="70 Prospect Ave"
|
9
|
-
addressCont="Apt M18"
|
10
|
-
city="West Chester"
|
11
|
-
homeId={8250263}
|
12
|
-
homeUrl="https://powerhrg.com/"
|
13
|
-
houseStyle="Colonial"
|
14
|
-
newWindow
|
15
|
-
state="PA"
|
16
|
-
territory="PHL"
|
17
|
-
zipcode="19382"
|
18
|
-
{...props}
|
19
|
-
/>
|
20
|
-
)
|
21
|
-
}
|
22
|
-
|
23
|
-
export default HomeAddressStreetLink
|
@@ -1 +0,0 @@
|
|
1
|
-
Use the `newWindow` / `new_window` prop to control whether the link opens on the same page or a new tab (same page is the default behavior)
|