playbook_ui 13.14.0.pre.alpha.play1101betaicons1825 → 13.14.0.pre.alpha.play1106filter1748
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 +1 -2
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +5 -5
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +3 -3
- data/app/pb_kits/playbook/pb_background/_background.tsx +9 -9
- data/app/pb_kits/playbook/pb_badge/_badge.tsx +2 -2
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +3 -3
- data/app/pb_kits/playbook/pb_body/_body.scss +5 -0
- data/app/pb_kits/playbook/pb_body/_body.tsx +9 -5
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +20 -0
- data/app/pb_kits/playbook/pb_body/body.rb +8 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +4 -3
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +3 -3
- data/app/pb_kits/playbook/pb_button/_button.tsx +37 -40
- data/app/pb_kits/playbook/pb_button/docs/_button_props_swift.md +0 -11
- data/app/pb_kits/playbook/pb_button/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +3 -3
- data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -1
- data/app/pb_kits/playbook/pb_card/_card.tsx +2 -2
- data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +4 -5
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +3 -3
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +9 -9
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +7 -5
- data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +2 -2
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +4 -5
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +12 -16
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +3 -3
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +2 -2
- data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +1 -1
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +57 -4
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +57 -4
- data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +16 -20
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_date/_date.tsx +7 -7
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +8 -8
- data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +3 -6
- data/app/pb_kits/playbook/pb_detail/_detail.scss +2 -2
- data/app/pb_kits/playbook/pb_detail/_detail.tsx +5 -5
- data/app/pb_kits/playbook/pb_detail/detail.rb +1 -1
- data/app/pb_kits/playbook/pb_detail/detail.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +2 -2
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +34 -42
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +5 -4
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +4 -4
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height.jsx +4 -8
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx +4 -8
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +2 -4
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +5 -5
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -1
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -1
- data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_image/_image.tsx +1 -1
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -1
- data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -1
- data/app/pb_kits/playbook/pb_list/_list.tsx +1 -1
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -1
- data/app/pb_kits/playbook/pb_map/_map.tsx +1 -1
- data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
- data/app/pb_kits/playbook/pb_message/_message_mention.tsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_nav.tsx +1 -1
- data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +1 -1
- data/app/pb_kits/playbook/pb_person/_person.tsx +1 -1
- data/app/pb_kits/playbook/pb_person/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -1
- data/app/pb_kits/playbook/pb_pill/_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
- data/app/pb_kits/playbook/pb_popover/index.ts +1 -1
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +1 -1
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +1 -1
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -1
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -1
- data/app/pb_kits/playbook/pb_select/_select.tsx +1 -1
- data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +1 -1
- data/app/pb_kits/playbook/pb_source/_source.tsx +1 -1
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +1 -1
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +1 -1
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
- data/app/pb_kits/playbook/pb_table/_table_row.tsx +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -1
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +1 -1
- data/app/pb_kits/playbook/pb_time/_time.tsx +1 -1
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -1
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -1
- data/app/pb_kits/playbook/pb_title/_title.scss +5 -0
- data/app/pb_kits/playbook/pb_title/_title.tsx +5 -2
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +19 -0
- data/app/pb_kits/playbook/pb_title/title.rb +9 -2
- data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -1
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +1 -1
- data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +1 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -1
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -1
- data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
- data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +1 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +2 -13
- data/app/pb_kits/playbook/utilities/props.ts +2 -2
- data/dist/playbook-rails.js +5 -5
- data/lib/playbook/classnames.rb +0 -1
- data/lib/playbook/kit_base.rb +0 -2
- data/lib/playbook/version.rb +1 -1
- metadata +2 -58
- data/app/pb_kits/playbook/pb_beta_icon/_icon.scss +0 -12
- data/app/pb_kits/playbook/pb_beta_icon/_icon.tsx +0 -164
- data/app/pb_kits/playbook/pb_beta_icon/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_beta_icon/docs/_footer.md +0 -2
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.html.erb +0 -3
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.jsx +0 -35
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.md +0 -1
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border.html.erb +0 -1
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border.jsx +0 -19
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border_swift.md +0 -7
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.html.erb +0 -16
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.jsx +0 -34
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.md +0 -19
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default.html.erb +0 -1
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default.jsx +0 -17
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default_swift.md +0 -7
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.html.erb +0 -1
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.jsx +0 -21
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.md +0 -7
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip.html.erb +0 -3
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip.jsx +0 -33
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip_swift.md +0 -11
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_props_swift.md +0 -8
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.html.erb +0 -2
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.jsx +0 -26
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.md +0 -1
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate.html.erb +0 -3
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate.jsx +0 -33
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate_swift.md +0 -11
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes.html.erb +0 -16
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes.jsx +0 -133
- data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes_swift.md +0 -46
- data/app/pb_kits/playbook/pb_beta_icon/docs/example.yml +0 -30
- data/app/pb_kits/playbook/pb_beta_icon/docs/index.js +0 -9
- data/app/pb_kits/playbook/pb_beta_icon/icon.html.erb +0 -15
- data/app/pb_kits/playbook/pb_beta_icon/icon.rb +0 -153
- data/app/pb_kits/playbook/pb_beta_icon/icon.test.js +0 -155
- data/app/pb_kits/playbook/pb_button/docs/_button_reaction_swift.md +0 -26
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default_swift.md +0 -11
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_props_table.md +0 -13
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes_swift.md +0 -18
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status_swift.md +0 -14
- data/app/pb_kits/playbook/pb_person/docs/_person_default_swift.md +0 -8
- data/app/pb_kits/playbook/pb_person/docs/_person_props_swift.md +0 -5
- data/app/pb_kits/playbook/pb_select/docs/_select_default_swift.md +0 -15
- data/app/pb_kits/playbook/pb_select/docs/_select_error_swift.md +0 -18
- data/app/pb_kits/playbook/pb_select/docs/_select_props_table.md +0 -8
- data/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md +0 -37
- data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +0 -10
- data/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md +0 -35
- data/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md +0 -27
- data/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md +0 -35
- data/app/pb_kits/playbook/tokens/exports/exports.d.ts +0 -1
- data/app/pb_kits/playbook/utilities/_truncate.scss +0 -20
- data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +0 -21
- data/lib/playbook/truncate.rb +0 -29
@@ -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('
|
15
|
+
expect(kit).toHaveClass('pb_detail_kit_light')
|
16
16
|
})
|
17
17
|
|
18
18
|
test('with colors', () => {
|
@@ -28,7 +28,7 @@ test('with colors', () => {
|
|
28
28
|
)
|
29
29
|
|
30
30
|
const kit = screen.getByTestId(testId)
|
31
|
-
expect(kit).toHaveClass(`
|
31
|
+
expect(kit).toHaveClass(`pb_detail_kit_${color}`)
|
32
32
|
})
|
33
33
|
})
|
34
34
|
|
@@ -2,10 +2,10 @@ import React from 'react'
|
|
2
2
|
import Icon from '../pb_icon/_icon'
|
3
3
|
|
4
4
|
type CloseIconProps = {
|
5
|
-
onClose: () =>
|
5
|
+
onClose: () => any,
|
6
6
|
}
|
7
7
|
|
8
|
-
export const CloseIcon = (props: CloseIconProps)
|
8
|
+
export const CloseIcon = (props: CloseIconProps) => {
|
9
9
|
const { onClose } = props
|
10
10
|
return (
|
11
11
|
<div
|
@@ -25,8 +25,8 @@ type DialogProps = {
|
|
25
25
|
className?: string;
|
26
26
|
closeable: boolean;
|
27
27
|
confirmButton?: string;
|
28
|
-
data?:
|
29
|
-
htmlOptions?: { [key: string]: string | number | boolean |
|
28
|
+
data?: object;
|
29
|
+
htmlOptions?: { [key: string]: string | number | boolean | Function };
|
30
30
|
id?: string;
|
31
31
|
fullHeight?: boolean;
|
32
32
|
loading?: boolean;
|
@@ -45,7 +45,7 @@ type DialogProps = {
|
|
45
45
|
trigger?: string;
|
46
46
|
};
|
47
47
|
|
48
|
-
const Dialog = (props: DialogProps)
|
48
|
+
const Dialog = (props: DialogProps) => {
|
49
49
|
const {
|
50
50
|
aria = {},
|
51
51
|
cancelButton,
|
@@ -59,9 +59,9 @@ const Dialog = (props: DialogProps): React.ReactElement => {
|
|
59
59
|
loading = false,
|
60
60
|
fullHeight = false,
|
61
61
|
opened,
|
62
|
-
onCancel,
|
63
|
-
onConfirm,
|
64
|
-
onClose,
|
62
|
+
onCancel = () => {},
|
63
|
+
onConfirm = () => {},
|
64
|
+
onClose = () => {},
|
65
65
|
placement = "center",
|
66
66
|
portalClassName,
|
67
67
|
shouldCloseOnOverlayClick = true,
|
@@ -168,22 +168,22 @@ const Dialog = (props: DialogProps): React.ReactElement => {
|
|
168
168
|
return (
|
169
169
|
<DialogContext.Provider value={api}>
|
170
170
|
<div
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
171
|
+
{...ariaProps}
|
172
|
+
{...dataProps}
|
173
|
+
{...htmlProps}
|
174
|
+
className={classes}
|
175
175
|
>
|
176
176
|
<Modal
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
177
|
+
ariaHideApp={false}
|
178
|
+
className={dialogClassNames}
|
179
|
+
closeTimeoutMS={200}
|
180
|
+
contentLabel="Minimal Modal Example"
|
181
|
+
id={id}
|
182
|
+
isOpen={modalIsOpened}
|
183
|
+
onRequestClose={onClose}
|
184
|
+
overlayClassName={overlayClassNames}
|
185
|
+
portalClassName={portalClassName}
|
186
|
+
shouldCloseOnOverlayClick={shouldCloseOnOverlayClick}
|
187
187
|
>
|
188
188
|
<>
|
189
189
|
{title && !status ? <Dialog.Header>{title}</Dialog.Header> : null}
|
@@ -193,41 +193,33 @@ const Dialog = (props: DialogProps): React.ReactElement => {
|
|
193
193
|
className="dialog_status_text_align"
|
194
194
|
padding="md"
|
195
195
|
>
|
196
|
-
<Flex align="center"
|
197
|
-
orientation="column"
|
198
|
-
>
|
196
|
+
<Flex align="center" orientation="column">
|
199
197
|
<IconCircle
|
200
|
-
|
201
|
-
|
202
|
-
|
198
|
+
icon={sweetAlertStatus[status].icon}
|
199
|
+
size={sweetAlertStatus[status].size}
|
200
|
+
variant={sweetAlertStatus[status].variant}
|
203
201
|
/>
|
204
|
-
<Title marginTop="sm"
|
205
|
-
size={3}
|
206
|
-
>
|
202
|
+
<Title marginTop="sm" size={3}>
|
207
203
|
{title}
|
208
204
|
</Title>
|
209
|
-
<Body marginTop="xs"
|
210
|
-
text={text}
|
211
|
-
/>
|
205
|
+
<Body marginTop="xs" text={text} />
|
212
206
|
</Flex>
|
213
207
|
</Dialog.Body>
|
214
208
|
)}
|
215
209
|
{cancelButton && confirmButton ? (
|
216
210
|
<Dialog.Footer>
|
217
211
|
<Button
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
>
|
212
|
+
loading={loading}
|
213
|
+
onClick={onConfirm}
|
214
|
+
htmlType="button"
|
215
|
+
variant="primary">
|
223
216
|
{confirmButton}
|
224
217
|
</Button>
|
225
218
|
<Button
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
>
|
219
|
+
id="cancel-button"
|
220
|
+
onClick={onCancel}
|
221
|
+
variant="link"
|
222
|
+
htmlType="button">
|
231
223
|
{cancelButton}
|
232
224
|
</Button>
|
233
225
|
</Dialog.Footer>
|
@@ -10,7 +10,7 @@ type DialogBodyProps = {
|
|
10
10
|
}
|
11
11
|
|
12
12
|
// Body component
|
13
|
-
const DialogBody = (props: DialogBodyProps)
|
13
|
+
const DialogBody = (props: DialogBodyProps) => {
|
14
14
|
const { children, className } = props
|
15
15
|
const bodyCSS = buildCss("dialog_body")
|
16
16
|
const bodySpacing = globalProps(props)
|
@@ -13,7 +13,7 @@ type DialogFooterProps = {
|
|
13
13
|
children: React.ReactChild[] | React.ReactChild | string,
|
14
14
|
className?: string,
|
15
15
|
data?: {[key: string]: string},
|
16
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
16
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
17
17
|
id?: string,
|
18
18
|
padding?: string,
|
19
19
|
paddingBottom?: string,
|
@@ -23,7 +23,7 @@ type DialogFooterProps = {
|
|
23
23
|
} & GlobalProps
|
24
24
|
|
25
25
|
// Footer component
|
26
|
-
const DialogFooter = (props: DialogFooterProps)
|
26
|
+
const DialogFooter = (props: DialogFooterProps) => {
|
27
27
|
const {
|
28
28
|
children,
|
29
29
|
className,
|
@@ -38,12 +38,13 @@ const DialogFooter = (props: DialogFooterProps): React.ReactElement => {
|
|
38
38
|
|
39
39
|
return (
|
40
40
|
<div
|
41
|
-
|
41
|
+
{...htmlProps}
|
42
42
|
>
|
43
43
|
{separator &&
|
44
44
|
<SectionSeparator />
|
45
45
|
}
|
46
|
-
<div className="dialog-pseudo-footer"
|
46
|
+
<div className="dialog-pseudo-footer">
|
47
|
+
</div>
|
47
48
|
<Flex
|
48
49
|
className={classnames(footerCSS, footerSpacing, className)}
|
49
50
|
spacing={spacing}
|
@@ -13,8 +13,8 @@ type DialogHeaderProps = {
|
|
13
13
|
children: React.ReactNode[] | React.ReactNode | string,
|
14
14
|
className?: string,
|
15
15
|
closeable?: boolean,
|
16
|
-
data?:
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
16
|
+
data?: object,
|
17
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
18
|
id?: string,
|
19
19
|
padding?: string,
|
20
20
|
separator?: boolean,
|
@@ -23,7 +23,7 @@ type DialogHeaderProps = {
|
|
23
23
|
title?: string,
|
24
24
|
} & GlobalProps
|
25
25
|
|
26
|
-
const DialogHeader = (props: DialogHeaderProps)
|
26
|
+
const DialogHeader = (props: DialogHeaderProps) => {
|
27
27
|
const {
|
28
28
|
aria = {},
|
29
29
|
children,
|
@@ -56,7 +56,7 @@ const DialogHeader = (props: DialogHeaderProps): React.ReactElement => {
|
|
56
56
|
{children}
|
57
57
|
{closeable &&
|
58
58
|
<CloseIcon
|
59
|
-
|
59
|
+
onClose={api.onClose}
|
60
60
|
/>
|
61
61
|
}
|
62
62
|
|
@@ -49,18 +49,15 @@ const DialogFullHeight = () => {
|
|
49
49
|
<Flex wrap>
|
50
50
|
<Button id="sm"
|
51
51
|
marginRight="md"
|
52
|
-
onClick={toggleHeaderSeparatorDialog}
|
53
|
-
>
|
52
|
+
onClick={toggleHeaderSeparatorDialog}>
|
54
53
|
{"Small Dialog"}
|
55
54
|
</Button>
|
56
55
|
<Button marginRight="md"
|
57
|
-
onClick={toggleFooterSeparatorDialog}
|
58
|
-
>
|
56
|
+
onClick={toggleFooterSeparatorDialog}>
|
59
57
|
{"Medium Dialog"}
|
60
58
|
</Button>
|
61
59
|
<Button marginRight="md"
|
62
|
-
onClick={toggleBothSeparatorsDialog}
|
63
|
-
>
|
60
|
+
onClick={toggleBothSeparatorsDialog}>
|
64
61
|
{"Large Dialog"}
|
65
62
|
</Button>
|
66
63
|
</Flex>
|
@@ -92,8 +89,7 @@ const DialogFullHeight = () => {
|
|
92
89
|
<Dialog.Footer>
|
93
90
|
<Button onClick={toggle}>{"Send My Issue"}</Button>
|
94
91
|
<Button onClick={toggle}
|
95
|
-
variant="link"
|
96
|
-
>
|
92
|
+
variant="link">
|
97
93
|
{"Back"}
|
98
94
|
</Button>
|
99
95
|
</Dialog.Footer>
|
@@ -48,18 +48,15 @@ const DialogFullHeightPlacement = () => {
|
|
48
48
|
<Flex wrap>
|
49
49
|
<Button id="sm"
|
50
50
|
marginRight="md"
|
51
|
-
onClick={toggleHeaderSeparatorDialog}
|
52
|
-
>
|
51
|
+
onClick={toggleHeaderSeparatorDialog}>
|
53
52
|
{"Left Dialog"}
|
54
53
|
</Button>
|
55
54
|
<Button marginRight="xl"
|
56
|
-
onClick={toggleFooterSeparatorDialog}
|
57
|
-
>
|
55
|
+
onClick={toggleFooterSeparatorDialog}>
|
58
56
|
{"Center Dialog"}
|
59
57
|
</Button>
|
60
58
|
<Button marginRight="xl"
|
61
|
-
onClick={toggleBothSeparatorsDialog}
|
62
|
-
>
|
59
|
+
onClick={toggleBothSeparatorsDialog}>
|
63
60
|
{"Right Dialog"}
|
64
61
|
</Button>
|
65
62
|
</Flex>
|
@@ -91,8 +88,7 @@ const DialogFullHeightPlacement = () => {
|
|
91
88
|
<Dialog.Footer>
|
92
89
|
<Button onClick={toggle}>{"Send My Issue"}</Button>
|
93
90
|
<Button onClick={toggle}
|
94
|
-
variant="link"
|
95
|
-
>
|
91
|
+
variant="link">
|
96
92
|
{"Back"}
|
97
93
|
</Button>
|
98
94
|
</Dialog.Footer>
|
@@ -16,12 +16,10 @@ const DialogScrollable = () => {
|
|
16
16
|
return (
|
17
17
|
<>
|
18
18
|
<Button marginRight="md"
|
19
|
-
onClick={toggleDialog1}
|
20
|
-
>{'Open Dialog'}
|
19
|
+
onClick={toggleDialog1}>{'Open Dialog'}
|
21
20
|
</Button>
|
22
21
|
<Button marginRight="md"
|
23
|
-
onClick={toggleDialog2}
|
24
|
-
>{'Open Full Height Dialog'}
|
22
|
+
onClick={toggleDialog2}>{'Open Full Height Dialog'}
|
25
23
|
</Button>
|
26
24
|
<Dialog
|
27
25
|
cancelButton="Cancel"
|
@@ -22,10 +22,3 @@ examples:
|
|
22
22
|
- dialog_stacked_alert: Stacked Button Alert
|
23
23
|
- dialog_full_height: Full Height
|
24
24
|
- dialog_full_height_placement: Full Height Placement
|
25
|
-
|
26
|
-
swift:
|
27
|
-
- dialog_default_swift: Simple
|
28
|
-
- dialog_sizes_swift: Sizes
|
29
|
-
- dialog_status_swift: Status
|
30
|
-
- dialog_props_table: ""
|
31
|
-
|
@@ -7,13 +7,13 @@ type DistributionBarProps = {
|
|
7
7
|
className?: string,
|
8
8
|
colors: [],
|
9
9
|
data?: string,
|
10
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
10
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
11
11
|
id?: string,
|
12
12
|
size?: "lg" | "sm",
|
13
13
|
widths?: number[],
|
14
14
|
}
|
15
15
|
|
16
|
-
const normalizeCharacters = (widths:
|
16
|
+
const normalizeCharacters = (widths: number[]) => {
|
17
17
|
return widths.map((width) => {
|
18
18
|
return parseInt(width.toString().replace(/[^0-9.]/gi, ''))
|
19
19
|
})
|
@@ -33,7 +33,7 @@ const barValues = (normalizedValues: number[], colors: []) => {
|
|
33
33
|
})
|
34
34
|
}
|
35
35
|
|
36
|
-
const DistributionBar = (props: DistributionBarProps)
|
36
|
+
const DistributionBar = (props: DistributionBarProps) => {
|
37
37
|
const {
|
38
38
|
htmlOptions = {},
|
39
39
|
size = 'lg',
|
@@ -45,8 +45,8 @@ const DistributionBar = (props: DistributionBarProps): React.ReactElement => {
|
|
45
45
|
|
46
46
|
return (
|
47
47
|
<div
|
48
|
-
|
49
|
-
|
48
|
+
className={classnames(`pb_distribution_bar_${size}`, globalProps(props))}
|
49
|
+
{...htmlProps}
|
50
50
|
>
|
51
51
|
{barValues(normalizedValues, colors)}
|
52
52
|
</div>
|
@@ -14,7 +14,7 @@ type FileUploadProps = {
|
|
14
14
|
className?: string,
|
15
15
|
customMessage?: string,
|
16
16
|
data?: {[key: string]: string | number},
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
17
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
18
|
acceptedFilesDescription?: string,
|
19
19
|
maxSize?: number,
|
20
20
|
onFilesAccepted: Callback<File, File>,
|
@@ -21,7 +21,7 @@ type FixedConfirmationToastProps = {
|
|
21
21
|
closeable?: boolean,
|
22
22
|
data?: string,
|
23
23
|
horizontal?: "right" | "left" | "center",
|
24
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
24
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
25
25
|
id?: string,
|
26
26
|
multiLine?: boolean,
|
27
27
|
onClose?: () => void,
|
@@ -10,7 +10,7 @@ type FlexProps = {
|
|
10
10
|
data?: object,
|
11
11
|
horizontal?: "left" | "center" | "right" | "stretch" | "none",
|
12
12
|
justify?: "start" | "center" | "end" | "around" | "between" | "evenly" | "none",
|
13
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
13
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
14
14
|
id?: string,
|
15
15
|
inline?: boolean,
|
16
16
|
orientation?: "row" | "column",
|
@@ -6,7 +6,7 @@ type FlexItemPropTypes = {
|
|
6
6
|
children: React.ReactNode[] | React.ReactNode,
|
7
7
|
fixedSize?: string,
|
8
8
|
grow?: boolean,
|
9
|
-
htmlOptions?: { [key: string]: string | number | boolean |
|
9
|
+
htmlOptions?: { [key: string]: string | number | boolean | Function },
|
10
10
|
shrink?: boolean,
|
11
11
|
className?: string,
|
12
12
|
order?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'first' | 'none',
|
@@ -9,7 +9,7 @@ import { buildHtmlProps } from '../utilities/props'
|
|
9
9
|
|
10
10
|
type FormPillProps = {
|
11
11
|
className?: string,
|
12
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
12
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
13
13
|
id?: string,
|
14
14
|
text: string,
|
15
15
|
name?: string,
|
@@ -22,7 +22,7 @@ type GaugeProps = {
|
|
22
22
|
disableAnimation?: boolean;
|
23
23
|
fullCircle?: boolean;
|
24
24
|
height?: string;
|
25
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
25
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
26
26
|
id?: string;
|
27
27
|
max?: number;
|
28
28
|
min?: number;
|
@@ -14,7 +14,7 @@ type HashtagProps = {
|
|
14
14
|
className?: string,
|
15
15
|
dark?: boolean,
|
16
16
|
data?: string,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
17
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
18
|
id?: string,
|
19
19
|
newWindow?: boolean,
|
20
20
|
rel?: string,
|
@@ -8,7 +8,7 @@ import { buildHtmlProps } from '../utilities/props'
|
|
8
8
|
type HighlightProps = {
|
9
9
|
className?: string,
|
10
10
|
data?: {[key: string]: string},
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
12
12
|
id?: string,
|
13
13
|
children?: React.ReactChild[] | React.ReactChild | string,
|
14
14
|
text?: string,
|
@@ -18,7 +18,7 @@ type HomeAddressStreetProps = {
|
|
18
18
|
data?: { [key: string]: string },
|
19
19
|
dark?: boolean,
|
20
20
|
emphasis: "street" | "city",
|
21
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
21
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
22
22
|
homeId: string,
|
23
23
|
houseStyle: string,
|
24
24
|
homeUrl: string,
|
@@ -28,7 +28,7 @@ type IconProps = {
|
|
28
28
|
fixedWidth?: boolean,
|
29
29
|
flip?: "horizontal" | "vertical" | "both" | "none",
|
30
30
|
icon: string,
|
31
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
31
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
32
32
|
id?: string,
|
33
33
|
inverse?: boolean,
|
34
34
|
listItem?: boolean,
|
@@ -13,7 +13,7 @@ type IconCircleProps = {
|
|
13
13
|
dark?: boolean,
|
14
14
|
data?: {[key:string]: string},
|
15
15
|
icon: string,
|
16
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
16
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
17
17
|
id?: string,
|
18
18
|
size?: "base" | "xs" | "sm" | "md" | "lg" | "xl",
|
19
19
|
variant?: | "default"
|
@@ -16,7 +16,7 @@ type IconStatValueProps = {
|
|
16
16
|
data?: object,
|
17
17
|
dark?: boolean,
|
18
18
|
icon: string,
|
19
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
19
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
20
20
|
id?: string,
|
21
21
|
orientation?: "vertical" | "horizontal",
|
22
22
|
size?: "sm" | "md" | "lg",
|
@@ -14,7 +14,7 @@ type IconValueProps = {
|
|
14
14
|
dark?: boolean,
|
15
15
|
data?: object,
|
16
16
|
icon: string,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
17
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
18
|
id?: string,
|
19
19
|
text: string,
|
20
20
|
}
|
@@ -8,7 +8,7 @@ type ImageType = {
|
|
8
8
|
aria?: {[key: string]: string},
|
9
9
|
className?: string,
|
10
10
|
data?: {[key: string]: string},
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
12
12
|
id?: string,
|
13
13
|
onError?: () => void,
|
14
14
|
size?: "xs" | "sm" | "md" | "lg" | "xl",
|
@@ -11,7 +11,7 @@ type LabelPillProps = {
|
|
11
11
|
aria?: {[key: string]:string},
|
12
12
|
className?: string,
|
13
13
|
data?: {[key: string]:string},
|
14
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
14
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
15
15
|
id?: string,
|
16
16
|
label?: string,
|
17
17
|
pillValue?: string,
|
@@ -17,7 +17,7 @@ type LabelValueProps = {
|
|
17
17
|
dark?: boolean;
|
18
18
|
data?: object;
|
19
19
|
date?: Date;
|
20
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
20
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function};
|
21
21
|
id?: string;
|
22
22
|
label: string;
|
23
23
|
value?: string;
|
@@ -12,7 +12,7 @@ type LayoutPropTypes = {
|
|
12
12
|
dark?: boolean,
|
13
13
|
data?: object,
|
14
14
|
full?: boolean,
|
15
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
15
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
16
16
|
position?: "left" | "right",
|
17
17
|
responsive?: boolean,
|
18
18
|
size?: "xs" | "sm" | "md" | "base" | "lg" | "xl",
|
@@ -13,7 +13,7 @@ type LegendProps = {
|
|
13
13
|
color?: string,
|
14
14
|
dark?: boolean,
|
15
15
|
data?: object,
|
16
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
16
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
17
17
|
id?: string,
|
18
18
|
prefixText?: string,
|
19
19
|
text: string,
|
@@ -24,7 +24,7 @@ type LightboxHeaderProps = {
|
|
24
24
|
className?: string;
|
25
25
|
closeable?: boolean;
|
26
26
|
data?: { [key: string]: string | number };
|
27
|
-
htmlOptions?: { [key: string]: string | number | boolean |
|
27
|
+
htmlOptions?: { [key: string]: string | number | boolean | Function };
|
28
28
|
icon?: string;
|
29
29
|
id?: string;
|
30
30
|
onClickRight?: () => void;
|
@@ -15,7 +15,7 @@ type LightboxType = {
|
|
15
15
|
currentPhotoIndex?: number,
|
16
16
|
data?: {[key: string]: string | number},
|
17
17
|
description?: string | any,
|
18
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
18
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
19
19
|
id?: string,
|
20
20
|
photos: [],
|
21
21
|
initialPhoto?: number,
|
@@ -22,7 +22,7 @@ type LineGraphProps = {
|
|
22
22
|
data: number[];
|
23
23
|
}[];
|
24
24
|
gradient?: boolean;
|
25
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
25
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function};
|
26
26
|
id: string;
|
27
27
|
pointStart: number;
|
28
28
|
subTitle?: string;
|
@@ -10,7 +10,7 @@ type ListProps = {
|
|
10
10
|
children: React.ReactNode[] | React.ReactNode;
|
11
11
|
dark?: boolean;
|
12
12
|
data?: object;
|
13
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
13
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function};
|
14
14
|
id?: string;
|
15
15
|
layout?: "" | "left" | "right";
|
16
16
|
ordered?: boolean;
|
@@ -8,7 +8,7 @@ type ListItemProps = {
|
|
8
8
|
children: React.ReactNode[] | React.ReactNode,
|
9
9
|
className?: string,
|
10
10
|
data?: object,
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
12
12
|
id?: string,
|
13
13
|
tabIndex?: number,
|
14
14
|
}
|
@@ -12,7 +12,7 @@ type LoadingInlineProps = {
|
|
12
12
|
aria?: { [key: string]: string },
|
13
13
|
className?: string,
|
14
14
|
data?: { [key: string]: string },
|
15
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
15
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
16
16
|
id?: string,
|
17
17
|
}
|
18
18
|
|
@@ -10,7 +10,7 @@ type MapProps = {
|
|
10
10
|
children?: React.ReactChild[] | React.ReactNode,
|
11
11
|
className?: string,
|
12
12
|
data?: { [key: string]: string },
|
13
|
-
htmlOptions?: {[key: string]: string | number | boolean |
|
13
|
+
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
14
14
|
id?: string,
|
15
15
|
zoomBtns?: boolean,
|
16
16
|
flyTo?: boolean,
|