playbook_ui 14.1.0.pre.alpha.PBNTR449rtepreviewerrails3605 → 14.1.0.pre.alpha.PBNTR455ganttchartPOC3569
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/_advanced_table.scss +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
- data/app/pb_kits/playbook/pb_badge/_badge.scss +0 -9
- data/app/pb_kits/playbook/pb_badge/_badge.tsx +3 -8
- data/app/pb_kits/playbook/pb_badge/badge.rb +1 -1
- data/app/pb_kits/playbook/pb_badge/badge.test.js +11 -17
- data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.html.erb +0 -13
- data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.jsx +12 -31
- data/app/pb_kits/playbook/pb_button/_button.tsx +1 -4
- data/app/pb_kits/playbook/pb_button/button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_button/button.rb +0 -4
- data/app/pb_kits/playbook/pb_date_time/dateTime.test.js +2 -2
- data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +1 -5
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +1 -3
- data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +1 -20
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +0 -4
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx +5 -1
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_dialog/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_filter/filter.rb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +0 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +25 -43
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +2 -6
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +4 -4
- data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +0 -4
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +2 -0
- data/app/pb_kits/playbook/pb_pagination/_pagination.scss +13 -49
- data/app/pb_kits/playbook/pb_pagination/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +7 -0
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +5 -10
- data/app/pb_kits/playbook/pb_rich_text_editor/_previewer_mixin.scss +13 -49
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +12 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +23 -23
- data/app/pb_kits/playbook/pb_rich_text_editor/_trix_styles.scss +27 -19
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +11 -21
- data/app/pb_kits/playbook/pb_star_rating/index.js +41 -78
- data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +2 -4
- data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +0 -17
- data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_display.tsx +2 -0
- data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_interactive.tsx +1 -0
- data/app/pb_kits/playbook/pb_time/_time.tsx +8 -12
- data/app/pb_kits/playbook/pb_time/time.html.erb +3 -3
- data/app/pb_kits/playbook/pb_time/time.rb +0 -4
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +3 -20
- data/dist/chunks/_typeahead-B6CmTH6o.js +22 -0
- data/dist/chunks/_weekday_stacked-CNZpeoOR.js +45 -0
- data/dist/chunks/{lib-DErGXNy3.js → lib-XlOB2yGW.js} +2 -2
- data/dist/chunks/{pb_form_validation-BC6kh7Hu.js → pb_form_validation-mwEv7D-z.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- 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/classnames.rb +0 -1
- data/lib/playbook/spacing.rb +2 -31
- data/lib/playbook/version.rb +1 -1
- metadata +9 -23
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.jsx +0 -46
- data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +0 -164
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx +0 -19
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md +0 -1
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +0 -62
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md +0 -1
- data/app/pb_kits/playbook/pb_pagination/docs/data.js +0 -23
- data/app/pb_kits/playbook/pb_pagination/docs/index.js +0 -2
- data/app/pb_kits/playbook/tokens/_container.scss +0 -21
- data/app/pb_kits/playbook/utilities/_min_width.scss +0 -45
- data/app/pb_kits/playbook/utilities/icons/allicons.tsx +0 -59
- data/app/pb_kits/playbook/utilities/icons/clock.svg +0 -9
- data/app/pb_kits/playbook/utilities/icons/spinner.svg +0 -3
- data/app/pb_kits/playbook/utilities/icons/times.svg +0 -3
- data/dist/chunks/_typeahead-Cq7RLPBA.js +0 -22
- data/dist/chunks/_weekday_stacked-Cykj5kLZ.js +0 -45
- /data/app/pb_kits/playbook/pb_pagination/docs/{_pagination_default_rails.md → _pagination_default.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e8a512656c877972bafc24c6eb07997b0416cd20fcd64e834c7e361e5994ae6
|
4
|
+
data.tar.gz: 8263da8743492e725a7883740bbab68a0991babf5a4d48c8ea3b5f91cd5968f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b943e98a13820d9797c4393c035dc9eeea40e152cbbc6743e1e922adbf5454ce869774aa69200a8109148fcc0e8a8426e8bb0d55261341d88030ee5806fbb9e
|
7
|
+
data.tar.gz: 8445df954e532fcf689cc502e7604e42714ed4fa32ede26a81b0fb35356646cd9224daa78274ac975ebc92d077a19ddbc286a6e4b397270146c168009c1460ca
|
@@ -164,7 +164,7 @@
|
|
164
164
|
background: $bg_dark;
|
165
165
|
}
|
166
166
|
|
167
|
-
.table-header-cells:first-child, td:first-child
|
167
|
+
.table-header-cells:first-child, td:first-child {
|
168
168
|
box-shadow: 1px 0px 0px 0px $border_dark !important;
|
169
169
|
}
|
170
170
|
|
@@ -172,7 +172,7 @@
|
|
172
172
|
background-color: $border_dark !important;
|
173
173
|
}
|
174
174
|
|
175
|
-
.sort-button-icon, .header-sort-button > div
|
175
|
+
.sort-button-icon, .header-sort-button > div {
|
176
176
|
color: $white !important;
|
177
177
|
}
|
178
178
|
|
@@ -237,4 +237,4 @@
|
|
237
237
|
}
|
238
238
|
}
|
239
239
|
}
|
240
|
-
}
|
240
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= pb_content_tag do %>
|
2
|
-
<%= pb_rails("table", props: { size: "sm", tag:"div", data_table: true, number_spacing:"tabular", responsive:"none"
|
2
|
+
<%= pb_rails("table", props: { size: "sm", tag:"div", data_table: true, number_spacing:"tabular", responsive:"none" }) do %>
|
3
3
|
<% if content.present? %>
|
4
4
|
<% content.presence %>
|
5
5
|
<% else %>
|
@@ -42,10 +42,6 @@
|
|
42
42
|
color: $white;
|
43
43
|
}
|
44
44
|
|
45
|
-
&[class*=_notification_error] {
|
46
|
-
background: $error;
|
47
|
-
}
|
48
|
-
|
49
45
|
&.dark {
|
50
46
|
border-width: 0;
|
51
47
|
|
@@ -55,10 +51,5 @@
|
|
55
51
|
color: map-get($status_color_text_dark, $color_name);
|
56
52
|
}
|
57
53
|
}
|
58
|
-
|
59
|
-
&[class*=_notification_error] {
|
60
|
-
background: $error_dark;
|
61
|
-
color: $white;
|
62
|
-
}
|
63
54
|
}
|
64
55
|
}
|
@@ -7,7 +7,6 @@ import {
|
|
7
7
|
buildCss,
|
8
8
|
buildDataProps,
|
9
9
|
buildHtmlProps } from '../utilities/props'
|
10
|
-
import { getAllIcons } from "../utilities/icons/allicons"
|
11
10
|
|
12
11
|
import Icon from '../pb_icon/_icon'
|
13
12
|
|
@@ -26,7 +25,7 @@ type BadgeProps = {
|
|
26
25
|
removeOnClick?: React.MouseEventHandler<HTMLSpanElement>,
|
27
26
|
rounded?: boolean,
|
28
27
|
text?: string,
|
29
|
-
variant?: "error" | "info" | "neutral" | "notification" | "
|
28
|
+
variant?: "error" | "info" | "neutral" | "notification" | "primary" | "success" | "warning",
|
30
29
|
} & GlobalProps
|
31
30
|
const Badge = (props: BadgeProps): React.ReactElement => {
|
32
31
|
const {
|
@@ -46,13 +45,10 @@ const Badge = (props: BadgeProps): React.ReactElement => {
|
|
46
45
|
const dataProps = buildDataProps(data)
|
47
46
|
const htmlProps = buildHtmlProps(htmlOptions)
|
48
47
|
const css = classnames(
|
49
|
-
buildCss('pb_badge_kit',
|
50
|
-
variant === "success" ? "success_sm" : variant === "notificationError" ? "notification_error" : variant,
|
51
|
-
rounded ? 'rounded' : ''),
|
48
|
+
buildCss('pb_badge_kit', variant === "success" ? "success_sm" : variant, rounded ? 'rounded' : null),
|
52
49
|
globalProps(props),
|
53
50
|
className
|
54
51
|
)
|
55
|
-
const timesIcon = getAllIcons()["times"]
|
56
52
|
|
57
53
|
return (
|
58
54
|
<div
|
@@ -71,9 +67,8 @@ const Badge = (props: BadgeProps): React.ReactElement => {
|
|
71
67
|
{...closeProps}
|
72
68
|
>
|
73
69
|
<Icon
|
74
|
-
className="svg-inline--fa"
|
75
|
-
customIcon={timesIcon.icon as unknown as { [key: string]: SVGElement }}
|
76
70
|
fixedWidth
|
71
|
+
icon="times"
|
77
72
|
/>
|
78
73
|
</span>
|
79
74
|
)}
|
@@ -6,7 +6,7 @@ module Playbook
|
|
6
6
|
prop :rounded, type: Playbook::Props::Boolean, default: false
|
7
7
|
prop :text
|
8
8
|
prop :variant, type: Playbook::Props::Enum,
|
9
|
-
values: %w[success warning error info neutral notification
|
9
|
+
values: %w[success warning error info neutral notification primary],
|
10
10
|
default: "neutral"
|
11
11
|
|
12
12
|
def classname
|
@@ -94,21 +94,15 @@ test('displays success variant', () => {
|
|
94
94
|
|
95
95
|
})
|
96
96
|
|
97
|
-
test('displays notification
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
)
|
109
|
-
const kit = screen.getByTestId(testId)
|
110
|
-
expect(kit).toHaveClass(`pb_badge_kit_${colorVariant === "notificationError" ? "notification_error" : "notification"}`)
|
111
|
-
|
112
|
-
cleanup()
|
113
|
-
})
|
97
|
+
test('displays notification variant', () => {
|
98
|
+
render(
|
99
|
+
<Badge
|
100
|
+
data={{ testid: testId }}
|
101
|
+
text="1"
|
102
|
+
variant="notification"
|
103
|
+
/>
|
104
|
+
)
|
105
|
+
const kit = screen.getByTestId(testId)
|
106
|
+
expect(kit).toHaveClass(`pb_badge_kit_notification`)
|
107
|
+
cleanup()
|
114
108
|
})
|
@@ -10,16 +10,3 @@
|
|
10
10
|
variant: "notification"
|
11
11
|
}) %>
|
12
12
|
</div>
|
13
|
-
|
14
|
-
<div>
|
15
|
-
<%= pb_rails("badge", props: {
|
16
|
-
text: "1",
|
17
|
-
variant: "notification_error",
|
18
|
-
rounded: true
|
19
|
-
}) %>
|
20
|
-
|
21
|
-
<%= pb_rails("badge", props: {
|
22
|
-
text: "4",
|
23
|
-
variant: "notification_error"
|
24
|
-
}) %>
|
25
|
-
</div>
|
@@ -4,39 +4,20 @@ import Badge from '../_badge'
|
|
4
4
|
const BadgeNotification = (props) => {
|
5
5
|
return (
|
6
6
|
<>
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
/>
|
7
|
+
<Badge
|
8
|
+
rounded
|
9
|
+
text="1"
|
10
|
+
variant="notification"
|
11
|
+
{...props}
|
12
|
+
/>
|
14
13
|
|
15
|
-
|
14
|
+
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div>
|
25
|
-
<Badge
|
26
|
-
rounded
|
27
|
-
text="1"
|
28
|
-
variant="notificationError"
|
29
|
-
{...props}
|
30
|
-
/>
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<Badge
|
35
|
-
text="4"
|
36
|
-
variant="notificationError"
|
37
|
-
{...props}
|
38
|
-
/>
|
39
|
-
</div>
|
16
|
+
<Badge
|
17
|
+
text="4"
|
18
|
+
variant="notification"
|
19
|
+
{...props}
|
20
|
+
/>
|
40
21
|
</>
|
41
22
|
)
|
42
23
|
}
|
@@ -3,7 +3,6 @@ import classnames from 'classnames'
|
|
3
3
|
import { buildAriaProps, buildDataProps, buildHtmlProps } from '../utilities/props'
|
4
4
|
import { GlobalProps, globalProps } from '../utilities/globalProps'
|
5
5
|
import { isValidEmoji } from '../utilities/validEmojiChecker'
|
6
|
-
import { getAllIcons } from "../utilities/icons/allicons"
|
7
6
|
|
8
7
|
import Icon from '../pb_icon/_icon'
|
9
8
|
import Caption from "../pb_caption/_caption"
|
@@ -66,7 +65,6 @@ const buttonClassName = (props: ButtonPropTypes) => {
|
|
66
65
|
|
67
66
|
return className
|
68
67
|
}
|
69
|
-
const spinnerIcon = getAllIcons()["spinner"]
|
70
68
|
|
71
69
|
const Button = (props: ButtonPropTypes): React.ReactElement => {
|
72
70
|
const {
|
@@ -105,9 +103,8 @@ const Button = (props: ButtonPropTypes): React.ReactElement => {
|
|
105
103
|
const loadingIcon = (
|
106
104
|
<div className="loading-icon">
|
107
105
|
<Icon
|
108
|
-
className="svg-inline--fa"
|
109
|
-
customIcon={spinnerIcon.icon as unknown as { [key: string]: SVGElement }}
|
110
106
|
fixedWidth
|
107
|
+
icon="spinner"
|
111
108
|
pulse
|
112
109
|
/>
|
113
110
|
</div>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<%= pb_rails("icon", props: { icon: "#{icon}", fixed_width: true, margin_right: "xs", font_style: object.icon_font_family }) %>
|
23
23
|
</span>
|
24
24
|
<% end %>
|
25
|
-
<%= pb_rails("icon", props: {
|
25
|
+
<%= pb_rails("icon", props: { icon: "spinner", pulse: true, fixed_width: true, classname: "loading-icon" }) %>
|
26
26
|
<span class="pb_button_content"><%= content.presence || object.text %></span>
|
27
27
|
<% if object.icon && object.icon_right %>
|
28
28
|
<span>
|
@@ -57,7 +57,7 @@ describe('DateTime Kit', () => {
|
|
57
57
|
|
58
58
|
const kit = screen.getByTestId(testId)
|
59
59
|
const text = kit.querySelector('.pb_time_kit_md.ml_sm')
|
60
|
-
const clock = kit.querySelector('.
|
60
|
+
const clock = kit.querySelector('.pb_icon_kit.far.fa-fw.fa-clock')
|
61
61
|
|
62
62
|
expect(clock).toBeInTheDocument()
|
63
63
|
expect(text.textContent).toEqual(' 12:00a EST')
|
@@ -72,7 +72,7 @@ describe('DateTime Kit', () => {
|
|
72
72
|
)
|
73
73
|
|
74
74
|
const kit = screen.getByTestId(testId)
|
75
|
-
const clock = kit.querySelector('.
|
75
|
+
const clock = kit.querySelector('.pb_icon_kit.far.fa-fw.fa-clock')
|
76
76
|
|
77
77
|
expect(clock).toBeNull()
|
78
78
|
})
|
@@ -1,24 +1,20 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Icon from '../pb_icon/_icon'
|
3
3
|
|
4
|
-
import { getAllIcons } from "../utilities/icons/allicons"
|
5
|
-
|
6
4
|
type CloseIconProps = {
|
7
5
|
onClose: () => void,
|
8
6
|
}
|
9
7
|
|
10
8
|
export const CloseIcon = (props: CloseIconProps): React.ReactElement => {
|
11
9
|
const { onClose } = props
|
12
|
-
const timesIcon = getAllIcons()["times"]
|
13
10
|
return (
|
14
11
|
<div
|
15
12
|
className="pb_dialog_close_icon"
|
16
13
|
onClick={onClose}
|
17
14
|
>
|
18
15
|
<Icon
|
19
|
-
className="svg-inline--fa"
|
20
|
-
customIcon={timesIcon.icon as unknown as { [key: string]: SVGElement }}
|
21
16
|
fixedWidth
|
17
|
+
icon="times"
|
22
18
|
/>
|
23
19
|
</div>
|
24
20
|
)
|
@@ -183,7 +183,7 @@ const Dialog = (props: DialogProps): React.ReactElement => {
|
|
183
183
|
onRequestClose={onClose}
|
184
184
|
overlayClassName={overlayClassNames}
|
185
185
|
portalClassName={portalClassName}
|
186
|
-
shouldCloseOnOverlayClick={shouldCloseOnOverlayClick
|
186
|
+
shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}
|
187
187
|
>
|
188
188
|
<>
|
189
189
|
{title && !status ? <Dialog.Header>{title}</Dialog.Header> : null}
|
@@ -215,7 +215,6 @@ const Dialog = (props: DialogProps): React.ReactElement => {
|
|
215
215
|
{cancelButton && confirmButton ? (
|
216
216
|
<Dialog.Footer>
|
217
217
|
<Button
|
218
|
-
disabled={loading}
|
219
218
|
htmlType="button"
|
220
219
|
loading={loading}
|
221
220
|
onClick={onConfirm}
|
@@ -224,7 +223,6 @@ const Dialog = (props: DialogProps): React.ReactElement => {
|
|
224
223
|
{confirmButton}
|
225
224
|
</Button>
|
226
225
|
<Button
|
227
|
-
disabled={loading}
|
228
226
|
htmlType="button"
|
229
227
|
id="cancel-button"
|
230
228
|
onClick={onCancel}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, {useState} from 'react'
|
2
|
-
import { render, cleanup, waitFor, fireEvent
|
2
|
+
import { render, cleanup, waitFor, fireEvent } from "../utilities/test-utils";
|
3
3
|
import { Dialog, Button } from 'playbook-ui'
|
4
4
|
|
5
5
|
const text="Hello Body Text, Nice to meet ya."
|
@@ -110,22 +110,3 @@ test("renders the right placement dialog", async () => {
|
|
110
110
|
cleanup()
|
111
111
|
});
|
112
112
|
|
113
|
-
test('renders loading dialog with disabled buttons', async () => {
|
114
|
-
|
115
|
-
const { queryByText } = render(<DialogTest />);
|
116
|
-
|
117
|
-
fireEvent.click(queryByText('Open Dialog'));
|
118
|
-
|
119
|
-
await waitFor(() => expect(queryByText("Okay")).toHaveTextContent(confirmButton));
|
120
|
-
await waitFor(() => expect(queryByText("Cancel Button")).toHaveTextContent(cancelButton));
|
121
|
-
|
122
|
-
fireEvent.click(queryByText('Okay'));
|
123
|
-
|
124
|
-
const loadingIconDiv = document.querySelector('.loading-icon');
|
125
|
-
expect(loadingIconDiv).toBeInTheDocument();
|
126
|
-
|
127
|
-
const cancelBtn = screen.getByRole('button', { name: cancelButton });
|
128
|
-
expect(cancelBtn).toBeDisabled();
|
129
|
-
|
130
|
-
cleanup()
|
131
|
-
})
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<%= content.presence || object.title %>
|
4
4
|
|
5
5
|
<button class="dialog-button-class" type="button" data-close-dialog= <%= object.id %> >
|
6
|
-
<%= pb_rails("icon", props:
|
6
|
+
<%= pb_rails("icon", props:{icon: "times"}) %>
|
7
7
|
</button>
|
8
8
|
<% end %>
|
9
9
|
<%= pb_rails("section_separator") %>
|
@@ -5,17 +5,21 @@ const DialogDefault = () => {
|
|
5
5
|
const [isOpen, setIsOpen] = useState(false)
|
6
6
|
const close = () => setIsOpen(false)
|
7
7
|
const open = () => setIsOpen(true)
|
8
|
+
const [isLoading, setIsLoading] = useState(false)
|
8
9
|
|
9
10
|
return (
|
10
11
|
<>
|
11
12
|
<Button onClick={open}>{'Open Dialog'}</Button>
|
12
13
|
<Dialog
|
13
14
|
cancelButton="Cancel Button"
|
15
|
+
className="wrapper"
|
14
16
|
confirmButton="Okay"
|
17
|
+
loading={isLoading}
|
15
18
|
onCancel={close}
|
16
19
|
onClose={close}
|
17
|
-
onConfirm={
|
20
|
+
onConfirm={() => setIsLoading(!isLoading)}
|
18
21
|
opened={isOpen}
|
22
|
+
portalClassName="portal"
|
19
23
|
size="sm"
|
20
24
|
text="Hello Body Text, Nice to meet ya."
|
21
25
|
title="Header Title is the Title Prop"
|
@@ -8,4 +8,3 @@ export { default as DialogStatus } from './_dialog_status.jsx'
|
|
8
8
|
export { default as DialogStackedAlert } from './_dialog_stacked_alert.jsx'
|
9
9
|
export { default as DialogFullHeight } from './_dialog_full_height.jsx'
|
10
10
|
export { default as DialogFullHeightPlacement } from './_dialog_full_height_placement.jsx'
|
11
|
-
export { default as DialogLoading } from './_dialog_loading.jsx'
|
@@ -35,7 +35,6 @@
|
|
35
35
|
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
|
36
36
|
<%= form.check_box :example_checkbox, props: { text: "Example Checkbox", label: true, required: true } %>
|
37
37
|
<%= form.date_picker :example_date_picker_2, props: { label: true, required: true } %>
|
38
|
-
<%= form.star_rating_field :example_star_rating, props: { variant: "interactive", label: true, required: true } %>
|
39
38
|
|
40
39
|
<%= form.actions do |action| %>
|
41
40
|
<%= action.submit %>
|
@@ -3,10 +3,9 @@
|
|
3
3
|
@import "../tokens/opacity";
|
4
4
|
@import "../tokens/shadows";
|
5
5
|
@import "../pb_avatar/avatar";
|
6
|
-
@import "../tokens/typography";
|
7
6
|
|
8
7
|
$selector: ".pb_form_pill";
|
9
|
-
$pb_form_pill_height:
|
8
|
+
$pb_form_pill_height: 37px;
|
10
9
|
$form_pill_colors: (
|
11
10
|
primary: map-get($status_color_text, "primary"),
|
12
11
|
neutral: map-get($status_color_text, "neutral"),
|
@@ -17,24 +16,18 @@ $form_pill_colors: (
|
|
17
16
|
display: inline-flex;
|
18
17
|
justify-content: center;
|
19
18
|
align-items: center;
|
20
|
-
padding: 0 calc($space-
|
19
|
+
padding: 0 calc($space-sm/3);
|
21
20
|
height: $pb_form_pill_height;
|
22
21
|
border-radius: calc($pb_form_pill_height/2);
|
23
22
|
margin-bottom: 2px;
|
24
23
|
margin-top: 2px;
|
25
24
|
cursor: pointer;
|
26
|
-
.pb_form_pill_text, .pb_form_pill_close, .pb_form_pill_tag{
|
27
|
-
font-size: $font_small !important;
|
28
|
-
}
|
29
25
|
@each $color_name, $color_value in $form_pill_colors {
|
30
26
|
&[class*=_#{$color_name}] {
|
31
27
|
background-color: mix($color_value, $card_light, 10%);
|
32
28
|
@if ($color_name == "neutral") {
|
33
29
|
background-color: $white;
|
34
30
|
border: 1px solid $border_light;
|
35
|
-
.pb_form_pill_icon {
|
36
|
-
color: $text_lt_default;
|
37
|
-
}
|
38
31
|
}
|
39
32
|
transition: background-color 0.2s ease;
|
40
33
|
box-shadow: none;
|
@@ -58,18 +51,20 @@ $form_pill_colors: (
|
|
58
51
|
@if ($color_name == "neutral") {
|
59
52
|
color: $text_lt_default;
|
60
53
|
}
|
61
|
-
padding:
|
54
|
+
padding-left: $space-sm;
|
55
|
+
padding-right: calc($space-sm/2);
|
62
56
|
}
|
63
57
|
#{$selector}_close {
|
64
58
|
color: $color_value;
|
59
|
+
padding-left: calc($space-sm/4);
|
60
|
+
padding-right: calc($space-sm/4);
|
65
61
|
display: flex;
|
66
62
|
align-items: center;
|
67
|
-
height
|
68
|
-
|
63
|
+
// I had to temporarily change height to 27px so new hover state darker background forms a circle not an oval
|
64
|
+
// before size change (ticket 2 of 4) - change back to 100% when $pb_form_pill_height changed to 27px from 37px
|
65
|
+
height: 27px;
|
66
|
+
border-radius: 70px;
|
69
67
|
cursor: pointer;
|
70
|
-
@if ($color_name == "neutral") {
|
71
|
-
color: $text_lt_default;
|
72
|
-
}
|
73
68
|
&:hover {
|
74
69
|
background-color: mix($color_value, $card_light, 40%);
|
75
70
|
@if ($color_name == "neutral") {
|
@@ -79,7 +74,7 @@ $form_pill_colors: (
|
|
79
74
|
}
|
80
75
|
#{$selector}_tag {
|
81
76
|
color: $color_value;
|
82
|
-
padding:
|
77
|
+
padding-left: $space-sm;
|
83
78
|
@if ($color_name == "neutral") {
|
84
79
|
color: $text_lt_default;
|
85
80
|
}
|
@@ -97,37 +92,24 @@ $form_pill_colors: (
|
|
97
92
|
.pb_form_pill_icon {
|
98
93
|
height: 12px !important;
|
99
94
|
width: 12px !important;
|
100
|
-
padding-right: $space_xs;
|
101
|
-
+ .pb_form_pill_text, + .pb_form_pill_tag {
|
102
|
-
padding-left: 0;
|
103
|
-
}
|
104
95
|
}
|
105
96
|
&.small {
|
106
|
-
height:
|
107
|
-
|
97
|
+
height: fit-content;
|
98
|
+
height: -moz-fit-content;
|
108
99
|
.pb_form_pill_text, .pb_form_pill_close, .pb_form_pill_tag {
|
109
|
-
font-size: $
|
100
|
+
font-size: $font_base;
|
101
|
+
font-weight: $regular;
|
110
102
|
}
|
111
103
|
.pb_form_pill_text, .pb_form_pill_tag {
|
112
104
|
line-height: 1.7;
|
113
|
-
padding:
|
114
|
-
|
115
|
-
.pb_form_pill_close {
|
116
|
-
height: 10px;
|
117
|
-
border-radius: calc(50%);
|
105
|
+
padding-left: $space_xs;
|
106
|
+
padding-right: 2px;
|
118
107
|
}
|
119
|
-
[class^=pb_avatar_kit] .avatar_wrapper {
|
120
|
-
|
121
|
-
height:
|
122
|
-
|
123
|
-
|
124
|
-
&::before { line-height: 16.5px; }
|
125
|
-
}
|
126
|
-
.pb_form_pill_icon {
|
127
|
-
padding-right: $space_xxs;
|
128
|
-
+ .pb_form_pill_text, + .pb_form_pill_tag {
|
129
|
-
padding-left: 0;
|
130
|
-
}
|
108
|
+
[class^=pb_avatar_kit], [class^=pb_avatar_kit] .avatar_wrapper {
|
109
|
+
width: 20px;
|
110
|
+
height: 20px;
|
111
|
+
flex-basis: 20px;
|
112
|
+
&::before { line-height: 21px; }
|
131
113
|
}
|
132
114
|
}
|
133
115
|
&.dark {
|
@@ -136,7 +118,7 @@ $form_pill_colors: (
|
|
136
118
|
// Primary and Neutral are exceptions to the general rule in the handoff
|
137
119
|
&[class*=_#{$color_name}] {
|
138
120
|
// background-color: mix($color_value, $card_dark, 10%);
|
139
|
-
// .
|
121
|
+
// .pb_form_pill_tag {
|
140
122
|
// color: $color_name;
|
141
123
|
// }
|
142
124
|
// .pb_form_pill_close {
|
@@ -154,7 +136,7 @@ $form_pill_colors: (
|
|
154
136
|
@if ($color_name == "neutral") {
|
155
137
|
background-color: transparent;
|
156
138
|
border: 1px solid $border_dark;
|
157
|
-
.pb_form_pill_text, .pb_form_pill_tag
|
139
|
+
.pb_form_pill_text, .pb_form_pill_tag {
|
158
140
|
color: $text_dk_default;
|
159
141
|
}
|
160
142
|
.pb_form_pill_close {
|
@@ -175,7 +157,7 @@ $form_pill_colors: (
|
|
175
157
|
}
|
176
158
|
@if ($color_name == "primary") {
|
177
159
|
background-color: mix($active_dark, $card_dark, 10%);
|
178
|
-
.pb_form_pill_text, .pb_form_pill_tag
|
160
|
+
.pb_form_pill_text, .pb_form_pill_tag {
|
179
161
|
color: $active_dark;
|
180
162
|
}
|
181
163
|
.pb_form_pill_close {
|
@@ -46,7 +46,6 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
46
46
|
} = props
|
47
47
|
|
48
48
|
const iconClass = icon ? "_icon" : ""
|
49
|
-
const closeIconSize = size === "small" ? "xs" : "sm"
|
50
49
|
const css = classnames(
|
51
50
|
`pb_form_pill_kit_${color}${iconClass}`,
|
52
51
|
globalProps(props),
|
@@ -70,7 +69,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
70
69
|
<Avatar
|
71
70
|
imageUrl={avatarUrl}
|
72
71
|
name={name}
|
73
|
-
size="
|
72
|
+
size="xs"
|
74
73
|
status={null}
|
75
74
|
/>
|
76
75
|
<Title
|
@@ -85,7 +84,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
85
84
|
<Avatar
|
86
85
|
imageUrl={avatarUrl}
|
87
86
|
name={name}
|
88
|
-
size="
|
87
|
+
size="xs"
|
89
88
|
status={null}
|
90
89
|
/>
|
91
90
|
<Title
|
@@ -95,7 +94,6 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
95
94
|
/>
|
96
95
|
<Icon
|
97
96
|
className="pb_form_pill_icon"
|
98
|
-
color={color}
|
99
97
|
icon={icon}
|
100
98
|
/>
|
101
99
|
</>
|
@@ -104,7 +102,6 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
104
102
|
<>
|
105
103
|
<Icon
|
106
104
|
className="pb_form_pill_icon"
|
107
|
-
color={color}
|
108
105
|
icon={icon}
|
109
106
|
/>
|
110
107
|
<Title
|
@@ -129,7 +126,6 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
|
|
129
126
|
<Icon
|
130
127
|
fixedWidth
|
131
128
|
icon="times"
|
132
|
-
size={closeIconSize}
|
133
129
|
/>
|
134
130
|
</div>
|
135
131
|
</div>
|