playbook_ui 18.2.0.pre.rc.3 → 18.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +3 -1
- data/app/pb_kits/playbook/pb_currency/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_dashboard_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_highlight.jsx +101 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_highlight.md +3 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_icon_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_label_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_message/_message.tsx +3 -1
- data/app/pb_kits/playbook/pb_message/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +3 -1
- data/app/pb_kits/playbook/pb_multiple_users/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +4 -2
- data/app/pb_kits/playbook/pb_multiple_users_stacked/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +3 -1
- data/app/pb_kits/playbook/pb_stat_value/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +3 -1
- data/app/pb_kits/playbook/pb_title_count/kit.schema.json +1 -0
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +3 -1
- data/app/pb_kits/playbook/pb_title_detail/kit.schema.json +1 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/onClick.test.js +227 -0
- data/dist/ai/all-schemas.json +11 -0
- data/dist/ai/forms.json +1 -1
- data/dist/ai/index.json +2 -2
- data/dist/ai/kits/currency.schema.json +1 -0
- data/dist/ai/kits/dashboard_value.schema.json +1 -0
- data/dist/ai/kits/icon_stat_value.schema.json +1 -0
- data/dist/ai/kits/icon_value.schema.json +1 -0
- data/dist/ai/kits/label_value.schema.json +1 -0
- data/dist/ai/kits/message.schema.json +1 -0
- data/dist/ai/kits/multiple_users.schema.json +1 -0
- data/dist/ai/kits/multiple_users_stacked.schema.json +1 -0
- data/dist/ai/kits/stat_value.schema.json +1 -0
- data/dist/ai/kits/title_count.schema.json +1 -0
- data/dist/ai/kits/title_detail.schema.json +1 -0
- data/dist/chunks/{_detail-Cy54syJC.js → _detail-Bsvl694i.js} +1 -1
- data/dist/chunks/_table-Bf6LGyL9.js +1 -0
- data/dist/chunks/{_typeahead-CXZH3KvV.js → _typeahead-w6S5Vx4b.js} +1 -1
- data/dist/chunks/vendor.js +2 -2
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +8 -9
- data/dist/chunks/_table-BCqp1PAO.js +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b5ac75f8f899c8e692ebc15d9e4c233540f1b055707c362099ca5f6bd23da085
|
|
4
|
+
data.tar.gz: 96f74ff346de6735599cbd46bf9d8b81e541b7ad7b258275e4174a922fe637ac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c8dc8cf0775094f3d738ff9fdb1bc5a7101d9f950c6503dd75c598da03e0a4353d9466a864947fbc905a42997a60f3e8ee29569179106b9c8fc796feb2fe6819
|
|
7
|
+
data.tar.gz: 119a30f2687af34eb8bfbc1c942182d128838437cb8c15f71a061600892d9fe5498fe400db526ee306120e4b90f220d0f97bb1467e829191e6b5fe9c35a09eaf
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
|
|
4
4
|
import { globalProps } from '../utilities/globalProps'
|
|
5
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
5
6
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
6
7
|
|
|
7
8
|
import Body from '../pb_body/_body'
|
|
@@ -28,7 +29,7 @@ type CurrencyProps = {
|
|
|
28
29
|
unit?: string,
|
|
29
30
|
unstyled?: boolean,
|
|
30
31
|
commaSeparator?: boolean,
|
|
31
|
-
}
|
|
32
|
+
} & GlobalEventProps
|
|
32
33
|
|
|
33
34
|
const sizes: {lg: 1, md: 3, sm: 4} = {
|
|
34
35
|
lg: 1,
|
|
@@ -132,6 +133,7 @@ const Currency = (props: CurrencyProps): React.ReactElement => {
|
|
|
132
133
|
{...ariaProps}
|
|
133
134
|
{...dataProps}
|
|
134
135
|
{...htmlProps}
|
|
136
|
+
{...globalEventProps(props)}
|
|
135
137
|
className={classes}
|
|
136
138
|
id={id}
|
|
137
139
|
>
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
4
4
|
import { globalProps } from '../utilities/globalProps'
|
|
5
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
5
6
|
|
|
6
7
|
import Body from '../pb_body/_body'
|
|
7
8
|
import StatChange from '../pb_stat_change/_stat_change'
|
|
@@ -23,7 +24,7 @@ type DashboardValueProps = {
|
|
|
23
24
|
unit?: string,
|
|
24
25
|
value?: string | number
|
|
25
26
|
}
|
|
26
|
-
}
|
|
27
|
+
} & GlobalEventProps
|
|
27
28
|
|
|
28
29
|
const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
|
|
29
30
|
const {
|
|
@@ -52,6 +53,7 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
|
|
|
52
53
|
{...ariaProps}
|
|
53
54
|
{...dataProps}
|
|
54
55
|
{...htmlProps}
|
|
56
|
+
{...globalEventProps(props)}
|
|
55
57
|
className={classes}
|
|
56
58
|
id={id}
|
|
57
59
|
>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import Avatar from '../../pb_avatar/_avatar'
|
|
4
|
+
import Body from '../../pb_body/_body'
|
|
5
|
+
import Dropdown from '../../pb_dropdown/_dropdown'
|
|
6
|
+
import Flex from '../../pb_flex/_flex'
|
|
7
|
+
import FlexItem from '../../pb_flex/_flex_item'
|
|
8
|
+
import Title from '../../pb_title/_title'
|
|
9
|
+
|
|
10
|
+
const USERS = [
|
|
11
|
+
{
|
|
12
|
+
label: "Wade Winningham",
|
|
13
|
+
title: "Nitro Principal Developer",
|
|
14
|
+
territory: "PHL",
|
|
15
|
+
value: "wadeWinningham",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "Carlos Lima",
|
|
19
|
+
title: "Nitro Developer",
|
|
20
|
+
territory: "PHL",
|
|
21
|
+
value: "carlosLima",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: "Stephen Marshall",
|
|
25
|
+
title: "Senior Nitro Developer",
|
|
26
|
+
territory: "PHL",
|
|
27
|
+
value: "stephenMarshall",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: "Jasper Furniss",
|
|
31
|
+
title: "Lead User Experience Engineer",
|
|
32
|
+
territory: "PHL",
|
|
33
|
+
value: "jasperFurniss",
|
|
34
|
+
},
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
const escapeRegExp = (value = "") => (
|
|
38
|
+
value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
const highlighted = (text, searchInput) => {
|
|
42
|
+
if (!searchInput) return text
|
|
43
|
+
|
|
44
|
+
const regex = new RegExp(`(${escapeRegExp(searchInput)})`, 'gi')
|
|
45
|
+
|
|
46
|
+
return text.split(regex).map((part, index) => (
|
|
47
|
+
part.toLowerCase() === searchInput.toLowerCase()
|
|
48
|
+
? <mark key={`${part}-${index}`}>{part}</mark>
|
|
49
|
+
: <React.Fragment key={`${part}-${index}`}>{part}</React.Fragment>
|
|
50
|
+
))
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const loadUsers = (searchInput) => {
|
|
54
|
+
const normalizedInput = searchInput.toLowerCase()
|
|
55
|
+
|
|
56
|
+
return Promise.resolve(USERS.filter(({ label, title }) => (
|
|
57
|
+
`${label} ${title}`.toLowerCase().includes(normalizedInput)
|
|
58
|
+
)))
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const DropdownWithHighlight = (props) => {
|
|
62
|
+
const [searchInput, setSearchInput] = useState("")
|
|
63
|
+
|
|
64
|
+
const renderUser = ({ label, territory, title }) => (
|
|
65
|
+
<Flex>
|
|
66
|
+
<FlexItem>
|
|
67
|
+
<Avatar
|
|
68
|
+
marginRight="sm"
|
|
69
|
+
name={label}
|
|
70
|
+
size="sm"
|
|
71
|
+
/>
|
|
72
|
+
</FlexItem>
|
|
73
|
+
<FlexItem>
|
|
74
|
+
<Title size={4}>
|
|
75
|
+
{highlighted(label, searchInput)}
|
|
76
|
+
</Title>
|
|
77
|
+
<Body color="light">
|
|
78
|
+
{highlighted(title, searchInput)}{" • "}
|
|
79
|
+
{territory}
|
|
80
|
+
</Body>
|
|
81
|
+
</FlexItem>
|
|
82
|
+
</Flex>
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<Dropdown
|
|
87
|
+
async
|
|
88
|
+
autocomplete
|
|
89
|
+
defaultOptions={USERS}
|
|
90
|
+
label="Users"
|
|
91
|
+
loadOptions={loadUsers}
|
|
92
|
+
onInputChange={(input) => setSearchInput(input)}
|
|
93
|
+
onSelect={() => setSearchInput("")}
|
|
94
|
+
placeholder="Search users"
|
|
95
|
+
renderOption={renderUser}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export default DropdownWithHighlight
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Use `onInputChange` to track the current search and `renderOption` to customize each option row. Split each field by the search input, then render matching text inside `<mark>` so users can quickly see why a result matched.
|
|
2
|
+
|
|
3
|
+
This example uses `loadOptions` to search both the user's name and title.
|
|
@@ -51,6 +51,7 @@ examples:
|
|
|
51
51
|
react:
|
|
52
52
|
- dropdown_default: Default
|
|
53
53
|
- dropdown_with_autocomplete: Autocomplete
|
|
54
|
+
- dropdown_with_highlight: With Highlight
|
|
54
55
|
- dropdown_multi_select: Multi Select
|
|
55
56
|
- dropdown_multi_select_with_autocomplete: Multi Select with Autocomplete
|
|
56
57
|
- dropdown_multi_select_display: Multi Select with Form Pill Props
|
|
@@ -47,4 +47,5 @@ export { default as DropdownAsyncMultiSelect } from './_dropdown_async_multi_sel
|
|
|
47
47
|
export { default as DropdownAsyncRichResults } from './_dropdown_async_rich_results.jsx'
|
|
48
48
|
export { default as DropdownAsyncInitialOptions } from './_dropdown_async_initial_options.jsx'
|
|
49
49
|
export { default as DropdownExternalSearch } from './_dropdown_external_search.jsx'
|
|
50
|
-
export { default as DropdownQuickpickEnableTime } from './_dropdown_quickpick_enable_time.jsx'
|
|
50
|
+
export { default as DropdownQuickpickEnableTime } from './_dropdown_quickpick_enable_time.jsx'
|
|
51
|
+
export { default as DropdownWithHighlight } from './_dropdown_with_highlight.jsx'
|
|
@@ -3,6 +3,7 @@ import classnames from 'classnames'
|
|
|
3
3
|
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
5
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
|
6
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
6
7
|
|
|
7
8
|
import Body from '../pb_body/_body'
|
|
8
9
|
import Caption from '../pb_caption/_caption'
|
|
@@ -33,7 +34,7 @@ type IconStatValueProps = {
|
|
|
33
34
|
| "yellow"
|
|
34
35
|
| "orange"
|
|
35
36
|
| "green"
|
|
36
|
-
} & GlobalProps
|
|
37
|
+
} & GlobalProps & GlobalEventProps
|
|
37
38
|
|
|
38
39
|
const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
|
|
39
40
|
const {
|
|
@@ -94,6 +95,7 @@ const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
|
|
|
94
95
|
{...ariaProps}
|
|
95
96
|
{...dataProps}
|
|
96
97
|
{...htmlProps}
|
|
98
|
+
{...globalEventProps(props)}
|
|
97
99
|
className={classes}
|
|
98
100
|
id={id}
|
|
99
101
|
>
|
|
@@ -3,6 +3,7 @@ import classnames from 'classnames'
|
|
|
3
3
|
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
|
6
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
6
7
|
|
|
7
8
|
import Body from '../pb_body/_body'
|
|
8
9
|
import Icon from '../pb_icon/_icon'
|
|
@@ -18,7 +19,7 @@ type IconValueProps = {
|
|
|
18
19
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
|
19
20
|
id?: string,
|
|
20
21
|
text: string,
|
|
21
|
-
}
|
|
22
|
+
} & GlobalEventProps
|
|
22
23
|
|
|
23
24
|
const IconValue = (props: IconValueProps): React.ReactElement => {
|
|
24
25
|
const {
|
|
@@ -46,6 +47,7 @@ const IconValue = (props: IconValueProps): React.ReactElement => {
|
|
|
46
47
|
{...ariaProps}
|
|
47
48
|
{...dataProps}
|
|
48
49
|
{...htmlProps}
|
|
50
|
+
{...globalEventProps(props)}
|
|
49
51
|
className={classes}
|
|
50
52
|
id={id}
|
|
51
53
|
>
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import classnames from "classnames";
|
|
3
3
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
|
|
4
4
|
import { globalProps } from "../utilities/globalProps";
|
|
5
|
+
import { GlobalEventProps, globalEventProps } from "../utilities/globalEventProps";
|
|
5
6
|
import DateTime from '../pb_kit/dateTime';
|
|
6
7
|
|
|
7
8
|
import Body from "../pb_body/_body";
|
|
@@ -25,7 +26,7 @@ type LabelValueProps = {
|
|
|
25
26
|
icon?: string;
|
|
26
27
|
description?: string;
|
|
27
28
|
title?: string;
|
|
28
|
-
};
|
|
29
|
+
} & GlobalEventProps;
|
|
29
30
|
|
|
30
31
|
const dateString = (value: Date) => {
|
|
31
32
|
const month = DateTime.toMonthNum(value);
|
|
@@ -67,6 +68,7 @@ const LabelValue = (props: LabelValueProps) => {
|
|
|
67
68
|
{...ariaProps}
|
|
68
69
|
{...dataProps}
|
|
69
70
|
{...htmlProps}
|
|
71
|
+
{...globalEventProps(props)}
|
|
70
72
|
className={classes}
|
|
71
73
|
id={id}
|
|
72
74
|
title={title}
|
|
@@ -3,6 +3,7 @@ import classnames from 'classnames'
|
|
|
3
3
|
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
|
6
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
6
7
|
|
|
7
8
|
import Avatar from '../pb_avatar/_avatar'
|
|
8
9
|
import Body from '../pb_body/_body'
|
|
@@ -28,7 +29,7 @@ type MessageProps = {
|
|
|
28
29
|
timestampObject?: Date,
|
|
29
30
|
timezone?: string,
|
|
30
31
|
alignTimestamp?: string,
|
|
31
|
-
}
|
|
32
|
+
} & GlobalEventProps
|
|
32
33
|
|
|
33
34
|
const Message = (props: MessageProps) => {
|
|
34
35
|
const {
|
|
@@ -68,6 +69,7 @@ const Message = (props: MessageProps) => {
|
|
|
68
69
|
{...ariaProps}
|
|
69
70
|
{...dataProps}
|
|
70
71
|
{...htmlProps}
|
|
72
|
+
{...globalEventProps(props)}
|
|
71
73
|
className={classes}
|
|
72
74
|
id={id}
|
|
73
75
|
>
|
|
@@ -3,6 +3,7 @@ import classnames from 'classnames'
|
|
|
3
3
|
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
|
6
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
6
7
|
|
|
7
8
|
import Avatar from '../pb_avatar/_avatar'
|
|
8
9
|
import Tooltip from '../pb_tooltip/_tooltip'
|
|
@@ -19,7 +20,7 @@ type MultipleUsersProps = {
|
|
|
19
20
|
size?: "md" | "lg" | "sm" | "xl" | "xs" | "xxs",
|
|
20
21
|
withTooltip?: boolean,
|
|
21
22
|
users: Array<{ [key: string]: string }>,
|
|
22
|
-
}
|
|
23
|
+
} & GlobalEventProps
|
|
23
24
|
|
|
24
25
|
const MultipleUsers = (props: MultipleUsersProps): React.ReactElement => {
|
|
25
26
|
const {
|
|
@@ -126,6 +127,7 @@ const MultipleUsers = (props: MultipleUsersProps): React.ReactElement => {
|
|
|
126
127
|
{...ariaProps}
|
|
127
128
|
{...dataProps}
|
|
128
129
|
{...htmlProps}
|
|
130
|
+
{...globalEventProps(props)}
|
|
129
131
|
className={classes}
|
|
130
132
|
id={id}
|
|
131
133
|
>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
|
|
4
|
-
import { globalProps } from '../utilities/globalProps'
|
|
5
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
|
+
import { globalProps } from '../utilities/globalProps'
|
|
6
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
6
7
|
|
|
7
8
|
import Avatar from '../pb_avatar/_avatar'
|
|
8
9
|
import Badge from '../pb_badge/_badge'
|
|
@@ -17,7 +18,7 @@ type MultipleUsersStackedProps = {
|
|
|
17
18
|
size?: "md" | "lg" | "sm" | "xl"
|
|
18
19
|
users: Array<{ [key: string]: string }>,
|
|
19
20
|
variant: "default" | "bubble",
|
|
20
|
-
}
|
|
21
|
+
} & GlobalEventProps
|
|
21
22
|
|
|
22
23
|
const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
|
|
23
24
|
const {
|
|
@@ -132,6 +133,7 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
|
|
|
132
133
|
{...ariaProps}
|
|
133
134
|
{...dataProps}
|
|
134
135
|
{...htmlProps}
|
|
136
|
+
{...globalEventProps(props)}
|
|
135
137
|
className={classes}
|
|
136
138
|
id={id}
|
|
137
139
|
>
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
|
|
4
4
|
import { globalProps } from '../utilities/globalProps'
|
|
5
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
5
6
|
import { buildHtmlProps } from '../utilities/props'
|
|
6
7
|
import Title from '../pb_title/_title'
|
|
7
8
|
|
|
@@ -11,7 +12,7 @@ type StatValueProps = {
|
|
|
11
12
|
id?: string,
|
|
12
13
|
unit?: string,
|
|
13
14
|
value: string | number,
|
|
14
|
-
}
|
|
15
|
+
} & GlobalEventProps
|
|
15
16
|
|
|
16
17
|
const StatValue = (props: StatValueProps): React.ReactElement => {
|
|
17
18
|
const {
|
|
@@ -53,6 +54,7 @@ const StatValue = (props: StatValueProps): React.ReactElement => {
|
|
|
53
54
|
className={classnames('pb_stat_value_kit', globalProps(props), className)}
|
|
54
55
|
id={id}
|
|
55
56
|
{...htmlProps}
|
|
57
|
+
{...globalEventProps(props)}
|
|
56
58
|
>
|
|
57
59
|
<div className="pb_stat_value_wrapper">
|
|
58
60
|
{displayValue(value)}
|
|
@@ -4,6 +4,7 @@ import classnames from 'classnames'
|
|
|
4
4
|
|
|
5
5
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
6
6
|
import { globalProps } from '../utilities/globalProps'
|
|
7
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
7
8
|
|
|
8
9
|
import Body from '../pb_body/_body'
|
|
9
10
|
import Title from '../pb_title/_title'
|
|
@@ -19,7 +20,7 @@ type TitleCountProps = {
|
|
|
19
20
|
id?: string,
|
|
20
21
|
title?: string,
|
|
21
22
|
size?: "lg" | "sm",
|
|
22
|
-
};
|
|
23
|
+
} & GlobalEventProps;
|
|
23
24
|
|
|
24
25
|
const TitleCount = (props: TitleCountProps): React.ReactElement => {
|
|
25
26
|
const {
|
|
@@ -50,6 +51,7 @@ const TitleCount = (props: TitleCountProps): React.ReactElement => {
|
|
|
50
51
|
{...ariaProps}
|
|
51
52
|
{...dataProps}
|
|
52
53
|
{...htmlProps}
|
|
54
|
+
{...globalEventProps(props)}
|
|
53
55
|
className={css}
|
|
54
56
|
id={id}
|
|
55
57
|
>
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
|
|
4
4
|
import { GlobalProps, globalProps } from '../utilities/globalProps'
|
|
5
|
+
import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
|
|
5
6
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
6
7
|
|
|
7
8
|
import Body from '../pb_body/_body'
|
|
@@ -16,7 +17,7 @@ type TitleDetailProps = {
|
|
|
16
17
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
|
17
18
|
id?: string,
|
|
18
19
|
title: string,
|
|
19
|
-
} & GlobalProps
|
|
20
|
+
} & GlobalProps & GlobalEventProps
|
|
20
21
|
|
|
21
22
|
const TitleDetail = (props: TitleDetailProps): React.ReactElement => {
|
|
22
23
|
const {
|
|
@@ -40,6 +41,7 @@ const TitleDetail = (props: TitleDetailProps): React.ReactElement => {
|
|
|
40
41
|
{...ariaProps}
|
|
41
42
|
{...dataProps}
|
|
42
43
|
{...htmlProps}
|
|
44
|
+
{...globalEventProps(props)}
|
|
43
45
|
className={classnames(pbCss, globalProps(props), className)}
|
|
44
46
|
id={id}
|
|
45
47
|
>
|