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
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
buildCss,
|
10
10
|
buildDataProps,
|
11
11
|
noop,
|
12
|
-
|
12
|
+
} from '../utilities/props'
|
13
13
|
|
14
14
|
import Icon from '../pb_icon/_icon'
|
15
15
|
import Checkbox from '../pb_checkbox/_checkbox'
|
@@ -28,9 +28,8 @@ type SelectableCardProps = {
|
|
28
28
|
disabled?: boolean,
|
29
29
|
error?: boolean,
|
30
30
|
icon?: boolean,
|
31
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
32
|
-
inputId?: string,
|
33
31
|
id?: string,
|
32
|
+
inputId?: string,
|
34
33
|
multi?: boolean,
|
35
34
|
name?: string,
|
36
35
|
onChange: (event: React.FormEvent<HTMLInputElement>) => void,
|
@@ -49,7 +48,6 @@ const SelectableCard = (props: SelectableCardProps) => {
|
|
49
48
|
data = {},
|
50
49
|
disabled = false,
|
51
50
|
error = false,
|
52
|
-
htmlOptions = {},
|
53
51
|
icon = false,
|
54
52
|
inputId = null,
|
55
53
|
multi = true,
|
@@ -61,7 +59,6 @@ const SelectableCard = (props: SelectableCardProps) => {
|
|
61
59
|
} = props
|
62
60
|
const ariaProps = buildAriaProps(aria)
|
63
61
|
const dataProps = buildDataProps(data)
|
64
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
65
62
|
|
66
63
|
const classes = classnames(buildCss('pb_selectable_card_kit',
|
67
64
|
{
|
@@ -112,7 +109,6 @@ const SelectableCard = (props: SelectableCardProps) => {
|
|
112
109
|
<div
|
113
110
|
{...ariaProps}
|
114
111
|
{...dataProps}
|
115
|
-
{...htmlProps}
|
116
112
|
className={classes}
|
117
113
|
>
|
118
114
|
<input
|
@@ -6,7 +6,6 @@ import {
|
|
6
6
|
buildAriaProps,
|
7
7
|
buildCss,
|
8
8
|
buildDataProps,
|
9
|
-
buildHtmlProps,
|
10
9
|
} from '../utilities/props'
|
11
10
|
|
12
11
|
import Body from '../pb_body/_body'
|
@@ -22,7 +21,6 @@ type SelectableCardIconProps = {
|
|
22
21
|
dark?: boolean,
|
23
22
|
data?: { [key: string]: string },
|
24
23
|
disabled?: boolean,
|
25
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
26
24
|
icon?: string,
|
27
25
|
inputId?: string,
|
28
26
|
multi?: boolean,
|
@@ -43,7 +41,6 @@ const SelectableCardIcon = (props: SelectableCardIconProps) => {
|
|
43
41
|
dark = false,
|
44
42
|
data = {},
|
45
43
|
disabled = false,
|
46
|
-
htmlOptions = {},
|
47
44
|
icon,
|
48
45
|
inputId,
|
49
46
|
multi = true,
|
@@ -56,7 +53,6 @@ const SelectableCardIcon = (props: SelectableCardIconProps) => {
|
|
56
53
|
|
57
54
|
const ariaProps = buildAriaProps(aria)
|
58
55
|
const dataProps = buildDataProps(data)
|
59
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
60
56
|
|
61
57
|
const classes = classnames(
|
62
58
|
buildCss('pb_selectable_card_icon_kit', {
|
@@ -72,7 +68,6 @@ const SelectableCardIcon = (props: SelectableCardIconProps) => {
|
|
72
68
|
<div
|
73
69
|
{...ariaProps}
|
74
70
|
{...dataProps}
|
75
|
-
{...htmlProps}
|
76
71
|
className={classes}
|
77
72
|
>
|
78
73
|
<SelectableCard
|
@@ -6,7 +6,6 @@ import {
|
|
6
6
|
buildAriaProps,
|
7
7
|
buildCss,
|
8
8
|
buildDataProps,
|
9
|
-
buildHtmlProps
|
10
9
|
} from '../utilities/props'
|
11
10
|
import Icon from '../pb_icon/_icon'
|
12
11
|
import Title from '../pb_title/_title'
|
@@ -18,7 +17,6 @@ type SelectableIconProps = {
|
|
18
17
|
customIcon?: {[key: string] :SVGElement},
|
19
18
|
disabled?: boolean,
|
20
19
|
data?: Object,
|
21
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
22
20
|
icon: string,
|
23
21
|
inputId: string,
|
24
22
|
inputs: string,
|
@@ -35,7 +33,6 @@ const SelectableIcon = ({
|
|
35
33
|
customIcon,
|
36
34
|
data = {},
|
37
35
|
disabled = false,
|
38
|
-
htmlOptions = {},
|
39
36
|
icon,
|
40
37
|
inputId,
|
41
38
|
inputs = 'enabled',
|
@@ -47,7 +44,6 @@ const SelectableIcon = ({
|
|
47
44
|
}: SelectableIconProps) => {
|
48
45
|
const ariaProps = buildAriaProps(aria)
|
49
46
|
const dataProps = buildDataProps(data)
|
50
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
51
47
|
|
52
48
|
const classes = classnames(
|
53
49
|
buildCss('pb_selectable_icon_kit', {
|
@@ -66,7 +62,6 @@ const SelectableIcon = ({
|
|
66
62
|
<div
|
67
63
|
{...ariaProps}
|
68
64
|
{...dataProps}
|
69
|
-
{...htmlProps}
|
70
65
|
className={classes}
|
71
66
|
>
|
72
67
|
{inputs === 'disabled' && (
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } 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 Checkbox from "../pb_checkbox/_checkbox";
|
@@ -15,7 +15,6 @@ export type SelectableListItemProps = {
|
|
15
15
|
className?: string;
|
16
16
|
data?: object;
|
17
17
|
defaultChecked?: boolean;
|
18
|
-
htmlOptions?: { [key: string]: string | number | boolean | Function };
|
19
18
|
id?: string;
|
20
19
|
label?: string;
|
21
20
|
text?: string;
|
@@ -32,7 +31,6 @@ const SelectableListItem = ({
|
|
32
31
|
className,
|
33
32
|
data = {},
|
34
33
|
defaultChecked,
|
35
|
-
htmlOptions = {},
|
36
34
|
id,
|
37
35
|
label,
|
38
36
|
text = "",
|
@@ -43,8 +41,7 @@ const SelectableListItem = ({
|
|
43
41
|
...props
|
44
42
|
}: SelectableListItemProps) => {
|
45
43
|
const ariaProps = buildAriaProps(aria);
|
46
|
-
const dataProps = buildDataProps(data)
|
47
|
-
const htmlProps = buildHtmlProps(htmlOptions);
|
44
|
+
const dataProps = buildDataProps(data);
|
48
45
|
const classes = classnames(
|
49
46
|
buildCss("pb_selectable_list_item_kit"),
|
50
47
|
globalProps(props),
|
@@ -64,12 +61,7 @@ const SelectableListItem = ({
|
|
64
61
|
{...props}
|
65
62
|
className={classnames(checkedState ? "checked_item" : "", className)}
|
66
63
|
>
|
67
|
-
<div
|
68
|
-
{...ariaProps}
|
69
|
-
{...dataProps}
|
70
|
-
{...htmlProps}
|
71
|
-
className={classes}
|
72
|
-
>
|
64
|
+
<div {...ariaProps} {...dataProps} className={classes}>
|
73
65
|
{variant == "checkbox" && (
|
74
66
|
<>
|
75
67
|
<Checkbox
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } 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 { SelectableListItemProps } from './_item.js'
|
7
7
|
|
@@ -13,7 +13,6 @@ type SelectableListProps = {
|
|
13
13
|
children?: React.ReactElement[],
|
14
14
|
className?: string,
|
15
15
|
data?: object,
|
16
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
17
16
|
id?: string,
|
18
17
|
variant?: 'checkbox' | 'radio',
|
19
18
|
}
|
@@ -24,14 +23,12 @@ const SelectableList = (props: SelectableListProps) => {
|
|
24
23
|
children,
|
25
24
|
className,
|
26
25
|
data = {},
|
27
|
-
htmlOptions = {},
|
28
26
|
id,
|
29
27
|
} = props
|
30
28
|
|
31
29
|
const ariaProps = buildAriaProps(aria)
|
32
30
|
const classes = classnames(buildCss('pb_selectable_list_kit'), globalProps(props), className)
|
33
31
|
const dataProps = buildDataProps(data)
|
34
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
35
32
|
const isRadio = props.variant === "radio"
|
36
33
|
const defaultCheckedRadioValue = children.filter((item: {props:SelectableListItemProps} ) => item.props.defaultChecked)[0]?.props?.value
|
37
34
|
|
@@ -61,7 +58,6 @@ const SelectableList = (props: SelectableListProps) => {
|
|
61
58
|
<div
|
62
59
|
{...ariaProps}
|
63
60
|
{...dataProps}
|
64
|
-
{...htmlProps}
|
65
61
|
className={classes}
|
66
62
|
id={id}
|
67
63
|
>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
|
-
import { buildDataProps, buildAriaProps
|
4
|
+
import { buildDataProps, buildAriaProps } from '../utilities/props'
|
5
5
|
import { titleize } from '../utilities/text'
|
6
6
|
|
7
7
|
import Avatar, { AvatarProps } from '../pb_avatar/_avatar'
|
@@ -15,7 +15,6 @@ type SourceProps = {
|
|
15
15
|
className?: string,
|
16
16
|
data?: { [key: string]: string },
|
17
17
|
hideIcon: boolean,
|
18
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
19
18
|
id?: string,
|
20
19
|
source?: string,
|
21
20
|
type: "events" | "inbound" | "outbound" | "prospecting" | "referral" | "retail" | "user",
|
@@ -27,14 +26,12 @@ const Source = ({
|
|
27
26
|
className,
|
28
27
|
data = {},
|
29
28
|
hideIcon = false,
|
30
|
-
htmlOptions = {},
|
31
29
|
id,
|
32
30
|
source,
|
33
31
|
type = 'inbound',
|
34
32
|
user = {},
|
35
33
|
}: SourceProps) => {
|
36
34
|
const dataProps = buildDataProps(data)
|
37
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
38
35
|
const ariaProps = buildAriaProps(aria)
|
39
36
|
|
40
37
|
const css = classnames([
|
@@ -74,7 +71,6 @@ const Source = ({
|
|
74
71
|
<div
|
75
72
|
{...ariaProps}
|
76
73
|
{...dataProps}
|
77
|
-
{...htmlProps}
|
78
74
|
className={css}
|
79
75
|
id={id}
|
80
76
|
>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from "react"
|
2
2
|
import classnames from "classnames"
|
3
3
|
|
4
|
-
import { buildAriaProps, buildDataProps
|
4
|
+
import { buildAriaProps, buildDataProps } from "../utilities/props"
|
5
5
|
|
6
6
|
import Icon from "../pb_icon/_icon"
|
7
7
|
|
@@ -11,7 +11,6 @@ type StarRatingProps = {
|
|
11
11
|
data?: object,
|
12
12
|
fixedWidth?: boolean,
|
13
13
|
hideRating: boolean,
|
14
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
15
14
|
icon?: string,
|
16
15
|
id?: string,
|
17
16
|
rating: number,
|
@@ -21,14 +20,12 @@ const StarRating = ({
|
|
21
20
|
aria = {},
|
22
21
|
className,
|
23
22
|
data = {},
|
24
|
-
htmlOptions = {},
|
25
23
|
hideRating = false,
|
26
24
|
id,
|
27
25
|
rating = 0,
|
28
26
|
}: StarRatingProps) => {
|
29
27
|
const ariaProps = buildAriaProps(aria)
|
30
28
|
const dataProps = buildDataProps(data)
|
31
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
32
29
|
const css = classnames([
|
33
30
|
"pb_star_rating_kit", className,
|
34
31
|
])
|
@@ -45,7 +42,6 @@ const StarRating = ({
|
|
45
42
|
<div
|
46
43
|
{...ariaProps}
|
47
44
|
{...dataProps}
|
48
|
-
{...htmlProps}
|
49
45
|
className={css}
|
50
46
|
id={id}
|
51
47
|
>
|
@@ -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 } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import Body from '../pb_body/_body'
|
@@ -22,29 +22,18 @@ type StatChangeProps = {
|
|
22
22
|
change?: 'increase' | 'decrease' | 'neutral',
|
23
23
|
className?: string,
|
24
24
|
icon?: string,
|
25
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
26
25
|
id?: string,
|
27
26
|
value?: string | number,
|
28
27
|
}
|
29
28
|
|
30
29
|
const StatChange = (props: StatChangeProps): React.ReactElement => {
|
31
|
-
const {
|
32
|
-
change = 'neutral',
|
33
|
-
className,
|
34
|
-
htmlOptions = {},
|
35
|
-
icon,
|
36
|
-
id,
|
37
|
-
value
|
38
|
-
} = props
|
39
|
-
|
30
|
+
const { change = 'neutral', className, icon, id, value } = props
|
40
31
|
const status = statusMap[change as keyof typeof statusMap]
|
41
32
|
let returnedIcon = iconMap[change as keyof typeof iconMap]
|
42
33
|
if (icon) {
|
43
34
|
returnedIcon = icon
|
44
35
|
}
|
45
36
|
|
46
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
47
|
-
|
48
37
|
return (
|
49
38
|
<>
|
50
39
|
{value &&
|
@@ -55,7 +44,6 @@ const StatChange = (props: StatChangeProps): React.ReactElement => {
|
|
55
44
|
className
|
56
45
|
)}
|
57
46
|
id={id}
|
58
|
-
{...htmlProps}
|
59
47
|
>
|
60
48
|
<Body status={status}>
|
61
49
|
{returnedIcon &&
|
@@ -2,12 +2,10 @@ import React from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
4
|
import { globalProps } from '../utilities/globalProps'
|
5
|
-
import { buildHtmlProps } from '../utilities/props'
|
6
5
|
import Title from '../pb_title/_title'
|
7
6
|
|
8
7
|
type StatValueProps = {
|
9
8
|
className?: string,
|
10
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
11
9
|
id?: string,
|
12
10
|
unit?: string,
|
13
11
|
value: string | number,
|
@@ -16,14 +14,11 @@ type StatValueProps = {
|
|
16
14
|
const StatValue = (props: StatValueProps): React.ReactElement => {
|
17
15
|
const {
|
18
16
|
className,
|
19
|
-
htmlOptions = {},
|
20
17
|
id,
|
21
18
|
unit,
|
22
19
|
value = 0,
|
23
20
|
} = props
|
24
21
|
|
25
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
26
|
-
|
27
22
|
const displayValue = function(value: string | number) {
|
28
23
|
if (value || value === 0) {
|
29
24
|
return (
|
@@ -52,7 +47,6 @@ const StatValue = (props: StatValueProps): React.ReactElement => {
|
|
52
47
|
<div
|
53
48
|
className={classnames('pb_stat_value_kit', globalProps(props), className)}
|
54
49
|
id={id}
|
55
|
-
{...htmlProps}
|
56
50
|
>
|
57
51
|
<div className="pb_stat_value_wrapper">
|
58
52
|
{displayValue(value)}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { useEffect } from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
|
-
import { buildAriaProps, buildDataProps
|
3
|
+
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
4
4
|
import { globalProps } from '../utilities/globalProps'
|
5
5
|
import PbTable from '.'
|
6
6
|
|
@@ -14,7 +14,6 @@ type TableProps = {
|
|
14
14
|
data?: { [key: string]: string },
|
15
15
|
dataTable: boolean,
|
16
16
|
disableHover: boolean,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
17
|
id?: string,
|
19
18
|
responsive: "collapse" | "scroll" | "none",
|
20
19
|
singleLine: boolean,
|
@@ -34,7 +33,6 @@ const Table = (props: TableProps) => {
|
|
34
33
|
data = {},
|
35
34
|
dataTable = false,
|
36
35
|
disableHover = false,
|
37
|
-
htmlOptions = {},
|
38
36
|
id,
|
39
37
|
responsive = 'collapse',
|
40
38
|
singleLine = false,
|
@@ -45,7 +43,6 @@ const Table = (props: TableProps) => {
|
|
45
43
|
|
46
44
|
const ariaProps = buildAriaProps(aria)
|
47
45
|
const dataProps = buildDataProps(data)
|
48
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
49
46
|
const tableCollapseCss = responsive !== 'none' ? `table-collapse-${collapse}` : ''
|
50
47
|
const verticalBorderCss = verticalBorder ? 'vertical-border' : ''
|
51
48
|
|
@@ -58,7 +55,6 @@ const Table = (props: TableProps) => {
|
|
58
55
|
<table
|
59
56
|
{...ariaProps}
|
60
57
|
{...dataProps}
|
61
|
-
{...htmlProps}
|
62
58
|
className={classnames(
|
63
59
|
'pb_table',
|
64
60
|
`table-${size}`,
|
@@ -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
|
type TableRowPropTypes = {
|
@@ -8,7 +8,6 @@ type TableRowPropTypes = {
|
|
8
8
|
children: React.ReactNode[] | React.ReactNode,
|
9
9
|
className: string,
|
10
10
|
data?: { [key: string]: string },
|
11
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
12
11
|
id?: string,
|
13
12
|
sideHighlightColor: string,
|
14
13
|
}
|
@@ -19,14 +18,12 @@ const TableRow = (props: TableRowPropTypes) => {
|
|
19
18
|
children,
|
20
19
|
className,
|
21
20
|
data = {},
|
22
|
-
htmlOptions = {},
|
23
21
|
id,
|
24
22
|
sideHighlightColor = 'windows',
|
25
23
|
} = props
|
26
24
|
|
27
25
|
const ariaProps = buildAriaProps(aria)
|
28
26
|
const dataProps = buildDataProps(data)
|
29
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
30
27
|
const sideHighlightClass =
|
31
28
|
sideHighlightColor != '' ? `side_highlight_${sideHighlightColor}` : null
|
32
29
|
const classes = classnames(buildCss('pb_table_row_kit', sideHighlightClass), globalProps(props), className)
|
@@ -35,7 +32,6 @@ const TableRow = (props: TableRowPropTypes) => {
|
|
35
32
|
<tr
|
36
33
|
{...ariaProps}
|
37
34
|
{...dataProps}
|
38
|
-
{...htmlProps}
|
39
35
|
className={classes}
|
40
36
|
id={id}
|
41
37
|
>
|
@@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
4
|
import { globalProps, GlobalProps, domSafeProps } from '../utilities/globalProps'
|
5
|
-
import { buildAriaProps, buildDataProps
|
5
|
+
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
6
6
|
|
7
7
|
import Flex from '../pb_flex/_flex'
|
8
8
|
import Card from '../pb_card/_card'
|
@@ -17,7 +17,6 @@ type TextInputProps = {
|
|
17
17
|
dark?: boolean,
|
18
18
|
disabled?: boolean,
|
19
19
|
error?: string,
|
20
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
21
20
|
id?: string,
|
22
21
|
inline?: boolean,
|
23
22
|
name: string,
|
@@ -44,7 +43,6 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
44
43
|
data = {},
|
45
44
|
disabled,
|
46
45
|
error,
|
47
|
-
htmlOptions = {},
|
48
46
|
id,
|
49
47
|
inline = false,
|
50
48
|
name,
|
@@ -59,7 +57,6 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
59
57
|
|
60
58
|
const ariaProps = buildAriaProps(aria)
|
61
59
|
const dataProps = buildDataProps(data)
|
62
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
63
60
|
|
64
61
|
const { alignment, border, icon } = addOn
|
65
62
|
const addOnAlignment = alignment === 'left' ? 'left' : 'right'
|
@@ -141,7 +138,6 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
141
138
|
<div
|
142
139
|
{...ariaProps}
|
143
140
|
{...dataProps}
|
144
|
-
{...htmlProps}
|
145
141
|
className={css}
|
146
142
|
>
|
147
143
|
{label &&
|
@@ -16,10 +16,3 @@ examples:
|
|
16
16
|
- text_input_add_on: Add On
|
17
17
|
- text_input_inline: Inline
|
18
18
|
- text_input_no_label: No Label
|
19
|
-
|
20
|
-
swift:
|
21
|
-
- text_input_default_swift: Default
|
22
|
-
- text_input_error_swift: With Error
|
23
|
-
- text_input_disabled_swift: Disabled
|
24
|
-
- text_input_add_on_swift: Add On
|
25
|
-
- text_input_props_swift: ""
|
@@ -6,7 +6,7 @@ import classnames from 'classnames'
|
|
6
6
|
import PbTextarea from '.'
|
7
7
|
import type { InputCallback } from '../types'
|
8
8
|
|
9
|
-
import { buildAriaProps, buildDataProps
|
9
|
+
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
10
10
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
11
11
|
|
12
12
|
import Body from '../pb_body/_body'
|
@@ -22,7 +22,6 @@ type TextareaProps = {
|
|
22
22
|
data?: {[key: string]: string},
|
23
23
|
disabled?: boolean,
|
24
24
|
error?: string,
|
25
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
26
25
|
id?: string,
|
27
26
|
inline?: boolean,
|
28
27
|
object?: string,
|
@@ -45,7 +44,6 @@ const Textarea = ({
|
|
45
44
|
children,
|
46
45
|
data = {},
|
47
46
|
disabled,
|
48
|
-
htmlOptions = {},
|
49
47
|
inline = false,
|
50
48
|
resize = 'none',
|
51
49
|
error,
|
@@ -73,7 +71,7 @@ const Textarea = ({
|
|
73
71
|
const noCount = typeof characterCount !== 'undefined'
|
74
72
|
const ariaProps: {[key: string]: any} = buildAriaProps(aria)
|
75
73
|
const dataProps: {[key: string]: any} = buildDataProps(data)
|
76
|
-
|
74
|
+
|
77
75
|
const characterCounter = () => {
|
78
76
|
return maxCharacters && characterCount ? `${checkIfZero(characterCount)} / ${maxCharacters}` : `${checkIfZero(characterCount)}`
|
79
77
|
}
|
@@ -86,7 +84,6 @@ const Textarea = ({
|
|
86
84
|
<div
|
87
85
|
{...ariaProps}
|
88
86
|
{...dataProps}
|
89
|
-
{...htmlProps}
|
90
87
|
className={classes}
|
91
88
|
>
|
92
89
|
<Caption text={label} />
|
@@ -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
|
import DateTime from '../pb_kit/dateTime';
|
7
7
|
|
@@ -16,7 +16,6 @@ type TimeProps = {
|
|
16
16
|
date: Date;
|
17
17
|
dark?: boolean;
|
18
18
|
id?: string;
|
19
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function};
|
20
19
|
showIcon?: boolean;
|
21
20
|
size?: "md" | "sm";
|
22
21
|
showTimezone?: boolean;
|
@@ -29,7 +28,6 @@ const Time = (props: TimeProps) => {
|
|
29
28
|
align,
|
30
29
|
className,
|
31
30
|
date,
|
32
|
-
htmlOptions = {},
|
33
31
|
showIcon,
|
34
32
|
size,
|
35
33
|
timeZone,
|
@@ -43,13 +41,8 @@ const Time = (props: TimeProps) => {
|
|
43
41
|
className
|
44
42
|
);
|
45
43
|
|
46
|
-
const htmlProps = buildHtmlProps(htmlOptions);
|
47
|
-
|
48
44
|
return (
|
49
|
-
<div
|
50
|
-
{...htmlProps}
|
51
|
-
className={classes}
|
52
|
-
>
|
45
|
+
<div className={classes}>
|
53
46
|
{showIcon && (
|
54
47
|
unstyled
|
55
48
|
? (
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
4
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
5
|
-
import { buildAriaProps, buildDataProps
|
5
|
+
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
6
6
|
import DateTime from '../pb_kit/dateTime';
|
7
7
|
|
8
8
|
import Body from '../pb_body/_body'
|
@@ -12,7 +12,6 @@ import Icon from '../pb_icon/_icon'
|
|
12
12
|
type TimeRangeInlineProps = {
|
13
13
|
aria?: { [key: string]: string },
|
14
14
|
className?: string,
|
15
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
16
15
|
id?: string,
|
17
16
|
data?: { [key: string]: string },
|
18
17
|
alignment?: "left" | "center" | "vertical",
|
@@ -42,7 +41,6 @@ const TimeRangeInline = (props: TimeRangeInlineProps) => {
|
|
42
41
|
className,
|
43
42
|
data = {},
|
44
43
|
alignment = 'left',
|
45
|
-
htmlOptions = {},
|
46
44
|
size = 'sm',
|
47
45
|
dark = false,
|
48
46
|
icon = false,
|
@@ -54,7 +52,6 @@ const TimeRangeInline = (props: TimeRangeInlineProps) => {
|
|
54
52
|
|
55
53
|
const dataProps: { [key: string]: string } = buildDataProps(data)
|
56
54
|
const ariaProps: { [key: string]: string } = buildAriaProps(aria)
|
57
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
58
55
|
|
59
56
|
const separator = (
|
60
57
|
<Body color="light">
|
@@ -90,7 +87,6 @@ const TimeRangeInline = (props: TimeRangeInlineProps) => {
|
|
90
87
|
<div
|
91
88
|
{...ariaProps}
|
92
89
|
{...dataProps}
|
93
|
-
{...htmlProps}
|
94
90
|
className={classnames('pb_time_range_inline_kit_' + alignment, globalProps(props), className)}
|
95
91
|
id={id}
|
96
92
|
>
|
@@ -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 { deprecatedProps, globalProps } from '../utilities/globalProps'
|
6
6
|
import DateTime from '../pb_kit/dateTime';
|
7
7
|
|
@@ -14,7 +14,6 @@ type TimeStackedProps = {
|
|
14
14
|
dark?: boolean,
|
15
15
|
data?: { [key: string]: string },
|
16
16
|
date?: Date,
|
17
|
-
htmlOptions?: {[key: string]: string | number | boolean | Function},
|
18
17
|
id?: string,
|
19
18
|
time?: number | Date,
|
20
19
|
timeZone?: string,
|
@@ -29,7 +28,6 @@ const TimeStackedDefault = (props: TimeStackedProps): React.ReactElement => {
|
|
29
28
|
dark,
|
30
29
|
data = {},
|
31
30
|
date,
|
32
|
-
htmlOptions = {},
|
33
31
|
time,
|
34
32
|
timeZone,
|
35
33
|
} = props
|
@@ -39,14 +37,12 @@ const TimeStackedDefault = (props: TimeStackedProps): React.ReactElement => {
|
|
39
37
|
globalProps(props),
|
40
38
|
className
|
41
39
|
)
|
42
|
-
|
43
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
40
|
+
const dataProps = buildDataProps(data)
|
44
41
|
|
45
42
|
return (
|
46
43
|
<div
|
47
44
|
className={classes}
|
48
45
|
{...dataProps}
|
49
|
-
{...htmlProps}
|
50
46
|
>
|
51
47
|
<Body
|
52
48
|
className={classnames('pb_time_stacked', 'time-spacing')}
|