playbook_ui 13.12.0.pre.alpha.play10281596 → 13.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +1 -5
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +2 -6
- data/app/pb_kits/playbook/pb_background/_background.tsx +5 -9
- data/app/pb_kits/playbook/pb_badge/_badge.tsx +1 -5
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +2 -6
- data/app/pb_kits/playbook/pb_body/_body.tsx +1 -5
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +1 -5
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +2 -5
- data/app/pb_kits/playbook/pb_button/_button.tsx +1 -8
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +1 -5
- data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -6
- data/app/pb_kits/playbook/pb_card/_card.tsx +1 -5
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +2 -7
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +2 -7
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +3 -5
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +1 -5
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +1 -5
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +1 -5
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +1 -5
- data/app/pb_kits/playbook/pb_date/_date.tsx +7 -12
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -5
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +1 -5
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +4 -15
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +5 -12
- data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +1 -5
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -5
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +4 -15
- data/app/pb_kits/playbook/pb_detail/_detail.tsx +1 -5
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +3 -11
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +3 -8
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +1 -5
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +1 -8
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +2 -6
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -6
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -6
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -6
- data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +1 -5
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -7
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +2 -6
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -5
- data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +0 -5
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +3 -10
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -7
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -5
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +1 -5
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +1 -5
- data/app/pb_kits/playbook/pb_image/_image.tsx +1 -6
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +1 -5
- data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +2 -6
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -6
- data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -5
- data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -6
- data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +1 -5
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +3 -9
- data/app/pb_kits/playbook/pb_list/_list.tsx +2 -7
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -5
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -5
- data/app/pb_kits/playbook/pb_map/_map.tsx +1 -6
- data/app/pb_kits/playbook/pb_message/_message.tsx +1 -5
- data/app/pb_kits/playbook/pb_message/_message_mention.tsx +1 -5
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -5
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -5
- data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +0 -6
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +1 -5
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +0 -6
- data/app/pb_kits/playbook/pb_nav/_item.tsx +2 -7
- data/app/pb_kits/playbook/pb_nav/_nav.tsx +1 -5
- data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -5
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +2 -6
- data/app/pb_kits/playbook/pb_person/_person.tsx +0 -5
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +1 -5
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +2 -8
- data/app/pb_kits/playbook/pb_pill/_pill.tsx +1 -5
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -6
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +1 -5
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +3 -9
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +1 -5
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +2 -6
- data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -5
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -7
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -5
- data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_select/_select.tsx +1 -6
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +2 -6
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +0 -5
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +0 -5
- data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +3 -11
- data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +1 -5
- data/app/pb_kits/playbook/pb_source/_source.tsx +1 -5
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +1 -5
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +2 -14
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +0 -6
- data/app/pb_kits/playbook/pb_table/_table.tsx +1 -5
- data/app/pb_kits/playbook/pb_table/_table_row.tsx +1 -5
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -5
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +2 -5
- data/app/pb_kits/playbook/pb_textarea/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_time/_time.tsx +2 -9
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -5
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +2 -6
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +2 -9
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -5
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -5
- data/app/pb_kits/playbook/pb_title/_title.tsx +1 -5
- data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -5
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +3 -16
- data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +0 -5
- data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -5
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +3 -9
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -7
- data/app/pb_kits/playbook/pb_user/_user.tsx +1 -5
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +1 -5
- data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +1 -5
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -5
- data/app/pb_kits/playbook/utilities/props.ts +0 -16
- data/dist/playbook-rails.js +5 -5
- data/lib/playbook/version.rb +2 -2
- metadata +7 -32
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default_swift.md +0 -11
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_props_swift.md +0 -7
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse_swift.md +0 -13
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_size_swift.md +0 -11
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md +0 -15
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md +0 -5
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md +0 -15
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md +0 -15
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children_swift.md +0 -14
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_dashed_swift.md +0 -7
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_line_swift.md +0 -8
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_props_swift.md +0 -8
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text_swift.md +0 -7
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical_swift.md +0 -18
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on_swift.md +0 -35
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default_swift.md +0 -29
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled_swift.md +0 -13
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md +0 -24
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_props_swift.md +0 -13
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default_swift.md +0 -27
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error_swift.md +0 -11
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_props_swift.md +0 -9
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default_swift.md +0 -11
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name_swift.md +0 -10
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_props_swift.md +0 -6
@@ -3,7 +3,7 @@ import classnames from 'classnames'
|
|
3
3
|
import useCollapsible from './useCollapsible'
|
4
4
|
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
6
|
-
import { buildAriaProps, buildCss, buildDataProps
|
6
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
7
7
|
|
8
8
|
import CollapsibleContent from './child_kits/CollapsibleContent'
|
9
9
|
import CollapsibleMain from './child_kits/CollapsibleMain'
|
@@ -22,7 +22,6 @@ type CollapsibleProps = {
|
|
22
22
|
iconSize?: IconSizes,
|
23
23
|
onIconClick?: ()=> void,
|
24
24
|
onClick?: ()=> void,
|
25
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
26
25
|
id?: string,
|
27
26
|
}
|
28
27
|
|
@@ -34,7 +33,6 @@ const Collapsible = ({
|
|
34
33
|
children = [],
|
35
34
|
collapsed = true,
|
36
35
|
data = {},
|
37
|
-
htmlOptions = {},
|
38
36
|
icon,
|
39
37
|
iconColor = 'default',
|
40
38
|
iconSize,
|
@@ -62,7 +60,6 @@ const Collapsible = ({
|
|
62
60
|
const { children: contentChildren, ...contentProps } = Content.props
|
63
61
|
const ariaProps = buildAriaProps(aria)
|
64
62
|
const dataProps = buildDataProps(data)
|
65
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
66
63
|
const classes = classnames(
|
67
64
|
buildCss('pb_collapsible_kit'),
|
68
65
|
globalProps(props),
|
@@ -73,7 +70,6 @@ const Collapsible = ({
|
|
73
70
|
<div
|
74
71
|
{...ariaProps}
|
75
72
|
{...dataProps}
|
76
|
-
{...htmlProps}
|
77
73
|
className={classes}
|
78
74
|
id={id}
|
79
75
|
>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
|
-
import { buildAriaProps, buildCss, buildDataProps
|
4
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import Body from '../pb_body/_body'
|
@@ -51,7 +51,6 @@ type ContactProps = {
|
|
51
51
|
contactType?: string,
|
52
52
|
contactValue: string,
|
53
53
|
data?: object,
|
54
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
55
54
|
id?: string,
|
56
55
|
}
|
57
56
|
|
@@ -63,11 +62,9 @@ const Contact = (props: ContactProps) => {
|
|
63
62
|
contactType,
|
64
63
|
contactValue,
|
65
64
|
data = {},
|
66
|
-
htmlOptions = {},
|
67
65
|
id } = props
|
68
66
|
const ariaProps = buildAriaProps(aria)
|
69
67
|
const dataProps = buildDataProps(data)
|
70
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
71
68
|
const classes = classnames(
|
72
69
|
buildCss('pb_contact_kit'),
|
73
70
|
globalProps(props),
|
@@ -77,7 +74,6 @@ const Contact = (props: ContactProps) => {
|
|
77
74
|
<div
|
78
75
|
{...ariaProps}
|
79
76
|
{...dataProps}
|
80
|
-
{...htmlProps}
|
81
77
|
className={classes}
|
82
78
|
id={id}
|
83
79
|
>
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
4
|
import { globalProps } from '../utilities/globalProps'
|
5
|
-
import { buildAriaProps, buildCss, buildDataProps
|
5
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
6
6
|
|
7
7
|
import Body from '../pb_body/_body'
|
8
8
|
import Caption from '../pb_caption/_caption'
|
@@ -18,7 +18,6 @@ type CurrencyProps = {
|
|
18
18
|
data?: {[key:string]:string},
|
19
19
|
decimals?: 'default' | 'matching',
|
20
20
|
emphasized?: boolean,
|
21
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
22
21
|
id?: string,
|
23
22
|
label?: string,
|
24
23
|
size?: 'sm' | 'md' | 'lg',
|
@@ -43,7 +42,6 @@ const Currency = (props: CurrencyProps) => {
|
|
43
42
|
data = {},
|
44
43
|
decimals = 'default',
|
45
44
|
emphasized = true,
|
46
|
-
htmlOptions = {},
|
47
45
|
id,
|
48
46
|
unit,
|
49
47
|
className,
|
@@ -67,7 +65,6 @@ const Currency = (props: CurrencyProps) => {
|
|
67
65
|
const [whole, decimal = '00'] = amount.split('.')
|
68
66
|
const ariaProps = buildAriaProps(aria)
|
69
67
|
const dataProps = buildDataProps(data)
|
70
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
71
68
|
const classes = classnames(
|
72
69
|
buildCss('pb_currency_kit', align, size),
|
73
70
|
globalProps(props),
|
@@ -99,7 +96,6 @@ const Currency = (props: CurrencyProps) => {
|
|
99
96
|
<div
|
100
97
|
{...ariaProps}
|
101
98
|
{...dataProps}
|
102
|
-
{...htmlProps}
|
103
99
|
className={classes}
|
104
100
|
id={id}
|
105
101
|
>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
|
-
import { buildAriaProps, buildCss, buildDataProps
|
3
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
4
4
|
import { globalProps } from '../utilities/globalProps'
|
5
5
|
|
6
6
|
import Body from '../pb_body/_body'
|
@@ -12,7 +12,6 @@ type DashboardValueProps = {
|
|
12
12
|
aria?: { [key: string]: string },
|
13
13
|
className?: string,
|
14
14
|
data?: { [key: string]: string },
|
15
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
16
15
|
id?: string,
|
17
16
|
statChange?: {
|
18
17
|
change? : 'increase' | 'decrease' | 'neutral',
|
@@ -31,7 +30,6 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
|
|
31
30
|
aria = {},
|
32
31
|
className,
|
33
32
|
data = {},
|
34
|
-
htmlOptions = {},
|
35
33
|
id,
|
36
34
|
statChange = {},
|
37
35
|
statLabel,
|
@@ -40,7 +38,6 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
|
|
40
38
|
|
41
39
|
const ariaProps = buildAriaProps(aria)
|
42
40
|
const dataProps = buildDataProps(data)
|
43
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
44
41
|
const classes = classnames(
|
45
42
|
buildCss('pb_dashboard_value_kit', align),
|
46
43
|
globalProps(props),
|
@@ -51,7 +48,6 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
|
|
51
48
|
<div
|
52
49
|
{...ariaProps}
|
53
50
|
{...dataProps}
|
54
|
-
{...htmlProps}
|
55
51
|
className={classes}
|
56
52
|
id={id}
|
57
53
|
>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import classnames from "classnames";
|
3
3
|
|
4
|
-
import { buildAriaProps, buildCss, buildDataProps
|
4
|
+
import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props";
|
5
5
|
import { globalProps } from "../utilities/globalProps";
|
6
6
|
import DateTime from '../pb_kit/dateTime';
|
7
7
|
|
@@ -15,7 +15,6 @@ type PbDateProps = {
|
|
15
15
|
aria?: { [key: string]: string };
|
16
16
|
className?: string;
|
17
17
|
data?: { [key: string]: string };
|
18
|
-
htmlOptions?: { [key: string]: string | number | boolean | Function };
|
19
18
|
id?: string;
|
20
19
|
showDayOfWeek?: boolean;
|
21
20
|
showIcon?: boolean;
|
@@ -30,7 +29,6 @@ const PbDate = (props: PbDateProps) => {
|
|
30
29
|
alignment = "left",
|
31
30
|
className,
|
32
31
|
data = {},
|
33
|
-
htmlOptions = {},
|
34
32
|
id,
|
35
33
|
showDayOfWeek = false,
|
36
34
|
showIcon = false,
|
@@ -45,9 +43,8 @@ const PbDate = (props: PbDateProps) => {
|
|
45
43
|
const year = DateTime.toYear(value);
|
46
44
|
const currentYear = new Date().getFullYear();
|
47
45
|
|
48
|
-
const ariaProps = buildAriaProps(aria)
|
49
|
-
const dataProps = buildDataProps(data)
|
50
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
46
|
+
const ariaProps = buildAriaProps(aria);
|
47
|
+
const dataProps = buildDataProps(data);
|
51
48
|
|
52
49
|
const classes = classnames(
|
53
50
|
buildCss("pb_date_kit", alignment),
|
@@ -56,12 +53,10 @@ const PbDate = (props: PbDateProps) => {
|
|
56
53
|
);
|
57
54
|
|
58
55
|
return (
|
59
|
-
<div
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
className={classes}
|
64
|
-
id={id}
|
56
|
+
<div {...ariaProps}
|
57
|
+
{...dataProps}
|
58
|
+
className={classes}
|
59
|
+
id={id}
|
65
60
|
>
|
66
61
|
{unstyled
|
67
62
|
? <>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useEffect } from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
|
-
import { buildAriaProps, buildCss, buildDataProps
|
4
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
5
5
|
import { deprecatedProps, globalProps, GlobalProps } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import datePickerHelper from './date_picker_helper'
|
@@ -25,7 +25,6 @@ type DatePickerProps = {
|
|
25
25
|
format?: string,
|
26
26
|
hideIcon?: boolean,
|
27
27
|
hideLabel?: boolean,
|
28
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
29
28
|
id?: string,
|
30
29
|
inLine?: boolean,
|
31
30
|
inputAria?: { [key: string]: string },
|
@@ -68,7 +67,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
68
67
|
format = 'm/d/Y',
|
69
68
|
hideIcon = false,
|
70
69
|
hideLabel = false,
|
71
|
-
htmlOptions = {},
|
72
70
|
id,
|
73
71
|
inLine = false,
|
74
72
|
inputAria = {},
|
@@ -97,7 +95,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
97
95
|
|
98
96
|
const ariaProps = buildAriaProps(aria)
|
99
97
|
const dataProps = buildDataProps(data)
|
100
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
101
98
|
const inputAriaProps = buildAriaProps(inputAria)
|
102
99
|
const inputDataProps = buildDataProps(inputData)
|
103
100
|
|
@@ -161,7 +158,6 @@ useEffect(() => {
|
|
161
158
|
<div
|
162
159
|
{...ariaProps}
|
163
160
|
{...dataProps}
|
164
|
-
{...htmlProps}
|
165
161
|
className={classes}
|
166
162
|
id={id}
|
167
163
|
>
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
2
2
|
import classnames from "classnames";
|
3
3
|
|
4
4
|
import { globalProps } from "../utilities/globalProps";
|
5
|
-
import { buildCss, buildDataProps
|
5
|
+
import { buildCss, buildDataProps } from "../utilities/props";
|
6
6
|
import DateTime from '../pb_kit/dateTime';
|
7
7
|
|
8
8
|
import Body from "../pb_body/_body";
|
@@ -16,7 +16,6 @@ type DateRangeInlineProps = {
|
|
16
16
|
align?: "left" | "center" | "vertical";
|
17
17
|
size?: "sm" | "xs";
|
18
18
|
dark?: boolean;
|
19
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function};
|
20
19
|
icon?: boolean;
|
21
20
|
startDate?: Date;
|
22
21
|
endDate?: Date;
|
@@ -41,7 +40,6 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
|
|
41
40
|
size = "sm",
|
42
41
|
align = "left",
|
43
42
|
data = {},
|
44
|
-
htmlOptions = {},
|
45
43
|
startDate,
|
46
44
|
endDate,
|
47
45
|
className,
|
@@ -81,7 +79,6 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
|
|
81
79
|
|
82
80
|
const dateRangeClasses = buildCss("pb_date_range_inline_kit", align);
|
83
81
|
const dataProps = buildDataProps(data)
|
84
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
85
82
|
const renderTime = (date: Date) => {
|
86
83
|
return (
|
87
84
|
<time dateTime={dateTimeIso(date)}>
|
@@ -97,7 +94,6 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
|
|
97
94
|
return (
|
98
95
|
<div
|
99
96
|
{...dataProps}
|
100
|
-
{...htmlProps}
|
101
97
|
className={classnames(dateRangeClasses, globalProps(props), className)}
|
102
98
|
>
|
103
99
|
<div className="pb_date_range_inline_wrapper">
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
|
-
import { buildCss, buildDataProps
|
4
|
+
import { buildCss, buildDataProps } from '../utilities/props'
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import Body from '../pb_body/_body'
|
@@ -15,32 +15,21 @@ type DateRangeStackedProps = {
|
|
15
15
|
data?: string,
|
16
16
|
dark?: boolean,
|
17
17
|
endDate: Date,
|
18
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
19
18
|
id?: string,
|
20
19
|
startDate: Date,
|
21
20
|
}
|
22
21
|
|
23
22
|
const DateRangeStacked = (props: DateRangeStackedProps) => {
|
24
|
-
const {
|
25
|
-
className,
|
26
|
-
dark = false,
|
27
|
-
endDate,
|
28
|
-
htmlOptions={},
|
29
|
-
startDate,
|
30
|
-
data={},
|
31
|
-
} = props
|
23
|
+
const { className, dark = false, endDate, startDate, data={} } = props
|
32
24
|
const css = classnames(
|
33
25
|
buildCss('pb_date_range_stacked'),
|
34
26
|
globalProps(props),
|
35
27
|
className
|
36
28
|
)
|
37
|
-
|
38
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
29
|
+
const dataProps = buildDataProps(data)
|
39
30
|
|
40
31
|
return (
|
41
|
-
<div
|
42
|
-
{...dataProps}
|
43
|
-
{...htmlProps}
|
32
|
+
<div {...dataProps}
|
44
33
|
className={css}
|
45
34
|
>
|
46
35
|
<Flex vertical="center">
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
|
3
3
|
import classnames from "classnames";
|
4
|
-
import { buildCss, buildDataProps
|
4
|
+
import { buildCss, buildDataProps } from "../utilities/props";
|
5
5
|
import { globalProps } from "../utilities/globalProps";
|
6
6
|
import DateTime from '../pb_kit/dateTime';
|
7
7
|
|
@@ -15,7 +15,6 @@ type DateStackedProps = {
|
|
15
15
|
dark?: boolean;
|
16
16
|
data?: string;
|
17
17
|
date: Date;
|
18
|
-
htmlOptions?: { [key: string]: string | number | boolean | Function };
|
19
18
|
size?: "sm" | "md";
|
20
19
|
id?: string;
|
21
20
|
reverse?: boolean;
|
@@ -35,7 +34,6 @@ const DateStacked = (props: DateStackedProps) => {
|
|
35
34
|
dark = false,
|
36
35
|
date,
|
37
36
|
data={},
|
38
|
-
htmlOptions={},
|
39
37
|
size = "sm",
|
40
38
|
} = props;
|
41
39
|
const classes = classnames(
|
@@ -50,15 +48,12 @@ const DateStacked = (props: DateStackedProps) => {
|
|
50
48
|
const currentYear = new Date().getFullYear()
|
51
49
|
const inputYear = DateTime.toYear(date);
|
52
50
|
const dataProps = buildDataProps(data)
|
53
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
54
51
|
|
55
52
|
return (
|
56
53
|
<>
|
57
54
|
{bold == false ? (
|
58
|
-
<div
|
59
|
-
|
60
|
-
{...htmlProps}
|
61
|
-
className={classes}
|
55
|
+
<div {...dataProps}
|
56
|
+
className={classes}
|
62
57
|
>
|
63
58
|
<div className="pb_date_stacked_day_month">
|
64
59
|
<Caption text={DateTime.toMonth(date).toUpperCase()} />
|
@@ -71,10 +66,8 @@ const DateStacked = (props: DateStackedProps) => {
|
|
71
66
|
{currentYear != inputYear && <Caption size="xs">{inputYear}</Caption>}
|
72
67
|
</div>
|
73
68
|
) : (
|
74
|
-
<div
|
75
|
-
|
76
|
-
{...htmlProps}
|
77
|
-
className={classes}
|
69
|
+
<div {...dataProps}
|
70
|
+
className={classes}
|
78
71
|
>
|
79
72
|
<div className="pb_date_stacked_day_month">
|
80
73
|
<Title
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
|
-
import { buildAriaProps, buildCss, buildDataProps
|
4
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import Flex from '../pb_flex/_flex'
|
@@ -14,7 +14,6 @@ type DateTimeProps = {
|
|
14
14
|
className?: string,
|
15
15
|
data?: { [key: string]: string; },
|
16
16
|
datetime: Date,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
17
|
id?: string,
|
19
18
|
size?: "sm" | "md",
|
20
19
|
showDayOfWeek: boolean,
|
@@ -28,7 +27,6 @@ const DateTime = (props: DateTimeProps) => {
|
|
28
27
|
aria = {},
|
29
28
|
className,
|
30
29
|
data = {},
|
31
|
-
htmlOptions = {},
|
32
30
|
showDayOfWeek = false,
|
33
31
|
datetime,
|
34
32
|
id,
|
@@ -39,7 +37,6 @@ const DateTime = (props: DateTimeProps) => {
|
|
39
37
|
|
40
38
|
const ariaProps = buildAriaProps(aria)
|
41
39
|
const dataProps = buildDataProps(data)
|
42
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
43
40
|
const classes = classnames(
|
44
41
|
buildCss('pb_date_time', size),
|
45
42
|
globalProps(props),
|
@@ -50,7 +47,6 @@ const DateTime = (props: DateTimeProps) => {
|
|
50
47
|
<div
|
51
48
|
{...ariaProps}
|
52
49
|
{...dataProps}
|
53
|
-
{...htmlProps}
|
54
50
|
className={classes}
|
55
51
|
id={id}
|
56
52
|
>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
import React from 'react'
|
3
3
|
|
4
|
-
import { buildCss
|
4
|
+
import { buildCss } from '../utilities/props'
|
5
5
|
import { deprecatedProps, globalProps } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import Flex from '../pb_flex/_flex'
|
@@ -11,7 +11,6 @@ import TimeStacked from '../pb_time_stacked/_time_stacked'
|
|
11
11
|
import DateStacked from '../pb_date_stacked/_date_stacked'
|
12
12
|
|
13
13
|
type DateTimeStackedProps = {
|
14
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
15
14
|
id?: string,
|
16
15
|
date: Date,
|
17
16
|
datetime: Date,
|
@@ -26,18 +25,15 @@ const DateTimeStacked = (props: DateTimeStackedProps): React.ReactElement => {
|
|
26
25
|
date,
|
27
26
|
datetime,
|
28
27
|
dark,
|
29
|
-
htmlOptions = {},
|
30
28
|
timeZone = 'America/New_York',
|
31
29
|
} = props
|
32
30
|
|
33
31
|
const classes = buildCss('pb_date_time_stacked_kit', globalProps(props))
|
34
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
35
32
|
|
36
33
|
return (
|
37
34
|
<Flex
|
38
35
|
inline={false}
|
39
36
|
vertical="stretch"
|
40
|
-
{...htmlProps}
|
41
37
|
{...props}
|
42
38
|
>
|
43
39
|
<FlexItem>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
|
-
import { buildCss, buildDataProps
|
4
|
+
import { buildCss, buildDataProps } from '../utilities/props'
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
6
6
|
import DateTime from '../pb_kit/dateTime';
|
7
7
|
|
@@ -14,31 +14,20 @@ type DateYearStackedProps = {
|
|
14
14
|
dark?: boolean,
|
15
15
|
data?: string,
|
16
16
|
date: Date,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
17
|
id?: string,
|
19
18
|
}
|
20
19
|
|
21
20
|
const DateYearStacked = (props: DateYearStackedProps) => {
|
22
|
-
const {
|
23
|
-
align = 'left',
|
24
|
-
className,
|
25
|
-
dark = false,
|
26
|
-
date,
|
27
|
-
data={},
|
28
|
-
htmlOptions = {},
|
29
|
-
} = props
|
21
|
+
const { align = 'left', className, dark = false, date, data={} } = props
|
30
22
|
const css = classnames(
|
31
23
|
buildCss('pb_date_year_stacked', align),
|
32
24
|
globalProps(props),
|
33
25
|
className
|
34
26
|
)
|
35
|
-
|
36
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
27
|
+
const dataProps = buildDataProps(data)
|
37
28
|
|
38
29
|
return (
|
39
|
-
<div
|
40
|
-
{...dataProps}
|
41
|
-
{...htmlProps}
|
30
|
+
<div {...dataProps}
|
42
31
|
className={css}
|
43
32
|
>
|
44
33
|
<Title
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
|
-
import { buildAriaProps, buildCss, buildDataProps
|
3
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
4
4
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
5
5
|
|
6
6
|
type DetailProps = {
|
@@ -11,7 +11,6 @@ type DetailProps = {
|
|
11
11
|
color?: 'light' | 'default' | 'lighter' | 'link' | 'error' | 'success',
|
12
12
|
dark?: boolean,
|
13
13
|
data?: { [key: string]: string },
|
14
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
15
14
|
id?: string,
|
16
15
|
tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
|
17
16
|
text?: string,
|
@@ -25,7 +24,6 @@ const Detail = (props: DetailProps) => {
|
|
25
24
|
className,
|
26
25
|
color = 'light',
|
27
26
|
data = {},
|
28
|
-
htmlOptions = {},
|
29
27
|
id = '',
|
30
28
|
tag = 'div',
|
31
29
|
text= ''
|
@@ -33,7 +31,6 @@ const Detail = (props: DetailProps) => {
|
|
33
31
|
|
34
32
|
const ariaProps: {[key: string]: any} = buildAriaProps(aria)
|
35
33
|
const dataProps: {[key: string]: any} = buildDataProps(data)
|
36
|
-
const htmlProps = buildHtmlProps(htmlOptions);
|
37
34
|
const isBold = bold ? "bold" : null
|
38
35
|
const classes = classnames(
|
39
36
|
buildCss('pb_detail_kit', color),
|
@@ -47,7 +44,6 @@ const Detail = (props: DetailProps) => {
|
|
47
44
|
<Tag
|
48
45
|
{...ariaProps}
|
49
46
|
{...dataProps}
|
50
|
-
{...htmlProps}
|
51
47
|
className={classes}
|
52
48
|
id={id}
|
53
49
|
>
|
@@ -5,7 +5,7 @@ import React, { useState } from "react";
|
|
5
5
|
import classnames from "classnames";
|
6
6
|
import Modal from "react-modal";
|
7
7
|
|
8
|
-
import { buildAriaProps, buildCss, buildDataProps
|
8
|
+
import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props";
|
9
9
|
import { globalProps } from "../utilities/globalProps";
|
10
10
|
|
11
11
|
import Body from "../pb_body/_body";
|
@@ -26,7 +26,6 @@ type DialogProps = {
|
|
26
26
|
closeable: boolean;
|
27
27
|
confirmButton?: string;
|
28
28
|
data?: object;
|
29
|
-
htmlOptions?: { [key: string]: string | number | boolean | Function };
|
30
29
|
id?: string;
|
31
30
|
fullHeight?: boolean;
|
32
31
|
loading?: boolean;
|
@@ -52,7 +51,6 @@ const Dialog = (props: DialogProps) => {
|
|
52
51
|
confirmButton,
|
53
52
|
className,
|
54
53
|
data = {},
|
55
|
-
htmlOptions = {},
|
56
54
|
id,
|
57
55
|
size = "md",
|
58
56
|
children,
|
@@ -71,8 +69,7 @@ const Dialog = (props: DialogProps) => {
|
|
71
69
|
trigger,
|
72
70
|
} = props;
|
73
71
|
const ariaProps = buildAriaProps(aria);
|
74
|
-
|
75
|
-
const htmlProps = buildHtmlProps(htmlOptions);
|
72
|
+
const dataProps = buildDataProps(data);
|
76
73
|
const dialogClassNames = {
|
77
74
|
base: classnames("pb_dialog", buildCss("pb_dialog", size, placement)),
|
78
75
|
afterOpen: "pb_dialog_after_open",
|
@@ -167,12 +164,7 @@ const Dialog = (props: DialogProps) => {
|
|
167
164
|
|
168
165
|
return (
|
169
166
|
<DialogContext.Provider value={api}>
|
170
|
-
<div
|
171
|
-
{...ariaProps}
|
172
|
-
{...dataProps}
|
173
|
-
{...htmlProps}
|
174
|
-
className={classes}
|
175
|
-
>
|
167
|
+
<div {...ariaProps} {...dataProps} className={classes}>
|
176
168
|
<Modal
|
177
169
|
ariaHideApp={false}
|
178
170
|
className={dialogClassNames}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
|
-
import { buildCss
|
4
|
+
import { buildCss } from '../../utilities/props'
|
5
5
|
import { GlobalProps, globalProps } from '../../utilities/globalProps'
|
6
6
|
|
7
7
|
import Flex from '../../pb_flex/_flex'
|
@@ -13,7 +13,6 @@ 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 | Function},
|
17
16
|
id?: string,
|
18
17
|
padding?: string,
|
19
18
|
paddingBottom?: string,
|
@@ -27,19 +26,15 @@ const DialogFooter = (props: DialogFooterProps) => {
|
|
27
26
|
const {
|
28
27
|
children,
|
29
28
|
className,
|
30
|
-
htmlOptions = {},
|
31
29
|
spacing = "between",
|
32
30
|
separator = false,
|
33
31
|
} = props
|
34
32
|
|
35
33
|
const footerCSS = buildCss("dialog_footer")
|
36
34
|
const footerSpacing = globalProps(props)
|
37
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
38
35
|
|
39
36
|
return (
|
40
|
-
|
41
|
-
{...htmlProps}
|
42
|
-
>
|
37
|
+
<>
|
43
38
|
{separator &&
|
44
39
|
<SectionSeparator />
|
45
40
|
}
|
@@ -51,7 +46,7 @@ const DialogFooter = (props: DialogFooterProps) => {
|
|
51
46
|
>
|
52
47
|
{children}
|
53
48
|
</Flex>
|
54
|
-
|
49
|
+
</>
|
55
50
|
)
|
56
51
|
}
|
57
52
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { useContext } from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
|
-
import { buildAriaProps, buildCss, buildDataProps
|
3
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../../utilities/props'
|
4
4
|
import { globalProps, GlobalProps } from '../../utilities/globalProps'
|
5
5
|
|
6
6
|
import { CloseIcon } from '../_close_icon'
|
@@ -14,7 +14,6 @@ type DialogHeaderProps = {
|
|
14
14
|
className?: string,
|
15
15
|
closeable?: boolean,
|
16
16
|
data?: object,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
17
|
id?: string,
|
19
18
|
padding?: string,
|
20
19
|
separator?: boolean,
|
@@ -29,7 +28,6 @@ const DialogHeader = (props: DialogHeaderProps) => {
|
|
29
28
|
children,
|
30
29
|
className,
|
31
30
|
data = {},
|
32
|
-
htmlOptions = {},
|
33
31
|
spacing = "between",
|
34
32
|
closeable = true,
|
35
33
|
separator = true,
|
@@ -37,7 +35,6 @@ const DialogHeader = (props: DialogHeaderProps) => {
|
|
37
35
|
|
38
36
|
const ariaProps = buildAriaProps(aria)
|
39
37
|
const dataProps = buildDataProps(data)
|
40
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
41
38
|
const api = useContext(DialogContext)
|
42
39
|
const headerCSS = buildCss("dialog_header")
|
43
40
|
const headerSpacing = globalProps(props)
|
@@ -49,7 +46,6 @@ const DialogHeader = (props: DialogHeaderProps) => {
|
|
49
46
|
<Flex
|
50
47
|
{...ariaProps}
|
51
48
|
{...dataProps}
|
52
|
-
{...htmlProps}
|
53
49
|
className={classnames(headerCSS, headerSpacing, className)}
|
54
50
|
spacing={spacing}
|
55
51
|
>
|