playbook_ui 13.15.0 → 13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2010
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/_playbook.scss +14 -12
- data/app/pb_kits/playbook/index.js +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx +30 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +59 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/LoadingCell.tsx +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +30 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/SubRowHeaderRow.tsx +61 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +120 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/ToggleIconButton.tsx +28 -0
- data/app/pb_kits/playbook/pb_advanced_table/Context/AdvancedTableContext.tsx +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/SubComponents/TableBody.tsx +95 -0
- data/app/pb_kits/playbook/pb_advanced_table/SubComponents/TableHeader.tsx +51 -0
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/helper_functions.tsx +77 -0
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +97 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +237 -0
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +56 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx +52 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data.js +278 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/_loading.scss +60 -0
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/_pseudo_states.scss +12 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_colors_swift.md +27 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default_swift.md +22 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_props_table.md +8 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_sizes_swift.md +26 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +6 -0
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +4 -2
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +5 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +40 -33
- data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +4 -4
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +44 -30
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +5 -5
- data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +3 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +7 -4
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +10 -10
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +10 -9
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +3 -2
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +3 -2
- data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -1
- data/app/pb_kits/playbook/pb_layout/layout.test.js +8 -4
- data/app/pb_kits/playbook/pb_legend/_legend.tsx +6 -6
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.tsx +4 -4
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/Carousel/index.tsx +3 -3
- data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +30 -22
- data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +5 -5
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +4 -4
- data/app/pb_kits/playbook/pb_list/_list.tsx +15 -15
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +9 -9
- data/app/pb_kits/playbook/pb_map/_map.tsx +8 -8
- data/app/pb_kits/playbook/pb_map/_map_controls.tsx +15 -7
- data/app/pb_kits/playbook/pb_map/_map_custom_button.tsx +4 -2
- data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
- data/app/pb_kits/playbook/pb_message/_message_mention.tsx +6 -6
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +46 -42
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +20 -20
- data/app/pb_kits/playbook/pb_nav/_item.tsx +56 -47
- data/app/pb_kits/playbook/pb_nav/_nav.tsx +15 -15
- data/app/pb_kits/playbook/pb_nav/docs/_nav_horizontal_bold_swift.md +17 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_horizontal_default_swift.md +17 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_horizontal_subtle_no_highlight_swift.md +18 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_horizontal_subtle_swift.md +18 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_props_swift.md +11 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_vertical_bold_swift.md +18 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_vertical_default_swift.md +18 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_vertical_subtle_no_highlight_swift.md +19 -0
- data/app/pb_kits/playbook/pb_nav/docs/_nav_vertical_subtle_swift.md +17 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +17 -0
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +51 -50
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +20 -19
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +4 -3
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +6 -4
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +20 -20
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +4 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx +19 -17
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.tsx +23 -21
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +18 -10
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +46 -23
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx +8 -8
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx +7 -7
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +17 -15
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +9 -7
- data/app/pb_kits/playbook/pb_select/_select.scss +13 -4
- data/app/pb_kits/playbook/pb_select/_select.tsx +7 -4
- data/app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.html.erb +24 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.jsx +38 -0
- data/app/pb_kits/playbook/pb_select/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_select/select.rb +6 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +25 -24
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +27 -26
- data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +2 -1
- data/app/pb_kits/playbook/pb_source/_source.tsx +15 -15
- data/app/pb_kits/playbook/pb_table/_table.tsx +29 -29
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -2
- data/app/pb_kits/playbook/playbook-doc.js +2 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
- data/dist/menu.yml +4 -1
- data/dist/playbook-rails.js +14 -6
- data/lib/playbook/version.rb +2 -2
- metadata +43 -7
@@ -0,0 +1,17 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedHDefault: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedHDefault,
|
8
|
+
variant: .normal,
|
9
|
+
orientation: .horizontal
|
10
|
+
) {
|
11
|
+
PBNavItem("Photos")
|
12
|
+
PBNavItem("Music")
|
13
|
+
PBNavItem("Video")
|
14
|
+
PBNavItem("Files")
|
15
|
+
}
|
16
|
+
|
17
|
+
```
|
@@ -0,0 +1,18 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedHSubtleNoHighlight: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedHSubtleNoHighlight,
|
8
|
+
variant: .subtle,
|
9
|
+
orientation: .horizontal,
|
10
|
+
borders: false,
|
11
|
+
highlight: false
|
12
|
+
) {
|
13
|
+
PBNavItem("Photos")
|
14
|
+
PBNavItem("Music")
|
15
|
+
PBNavItem("Video")
|
16
|
+
PBNavItem("Files")
|
17
|
+
}
|
18
|
+
```
|
@@ -0,0 +1,18 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedHSubtle: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedHSubtle,
|
8
|
+
variant: .subtle,
|
9
|
+
orientation: .horizontal,
|
10
|
+
borders: false
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
|
18
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
### Props
|
2
|
+
| Name | Type | Description | Default | Values |
|
3
|
+
| --- | ----------- | --------- | --------- | --------- |
|
4
|
+
| **selected** | `Int` | Sets selected to current index | `0` | |
|
5
|
+
| **currentHover** | `Int?` | Sets the current hover state to the current index| | |
|
6
|
+
| **variant** | `Variant` | Sets variant for nav | `.normal` | `normal` `subtle` `bold` |
|
7
|
+
| **orientation** | `Orientation` | Changes the orientation of nav | `.vertical` | `horizontal` `verticle` |
|
8
|
+
| **title** | `String?` | Sets title of nav | | |
|
9
|
+
| **borders** | `Bool` | Boolean value for whether nav items have a border or not | `true` | `true` `false` |
|
10
|
+
| **highlight** | `Bool` | Boolean value for adding a highlight to nav | `true` | `true` `false` |
|
11
|
+
| **views** | `[AnyView]` | An Array of AnyView | | |
|
@@ -0,0 +1,18 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedVBold: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedVBold,
|
8
|
+
variant: .bold,
|
9
|
+
orientation: .vertical,
|
10
|
+
borders: false
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
|
18
|
+
```
|
@@ -0,0 +1,18 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedVDefault: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedVDefault,
|
8
|
+
variant: .normal,
|
9
|
+
orientation: .vertical,
|
10
|
+
title: "Menu"
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
|
18
|
+
```
|
@@ -0,0 +1,19 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedVSubtleNoHighlight: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedVSubtleNoHighlight,
|
8
|
+
variant: .subtle,
|
9
|
+
orientation: .vertical,
|
10
|
+
borders: false,
|
11
|
+
highlight: false
|
12
|
+
) {
|
13
|
+
PBNavItem("Photos")
|
14
|
+
PBNavItem("Music")
|
15
|
+
PBNavItem("Video")
|
16
|
+
PBNavItem("Files")
|
17
|
+
}
|
18
|
+
|
19
|
+
```
|
@@ -0,0 +1,17 @@
|
|
1
|
+

|
2
|
+
|
3
|
+
```swift
|
4
|
+
@State private var selectedVSubtle: Int = 1
|
5
|
+
|
6
|
+
PBNav(
|
7
|
+
selected: $selectedVSubtle,
|
8
|
+
variant: .subtle,
|
9
|
+
orientation: .vertical,
|
10
|
+
borders: false
|
11
|
+
) {
|
12
|
+
PBNavItem("Photos")
|
13
|
+
PBNavItem("Music")
|
14
|
+
PBNavItem("Video")
|
15
|
+
PBNavItem("Files")
|
16
|
+
}
|
17
|
+
```
|
@@ -42,3 +42,20 @@ examples:
|
|
42
42
|
- block_nav: Block
|
43
43
|
- block_no_title_nav: Without Title
|
44
44
|
- new_tab: Open in a New Tab
|
45
|
+
|
46
|
+
swift:
|
47
|
+
- nav_vertical_default_swift: Vertical Default
|
48
|
+
- nav_vertical_subtle_swift: Vertical Subtle
|
49
|
+
- nav_vertical_subtle_no_highlight_swift: Vertical Subtle No Highlight
|
50
|
+
- nav_vertical_bold_swift: Vertical Bold
|
51
|
+
- nav_horizontal_default_swift: Horizontal Default
|
52
|
+
- nav_horizontal_subtle_swift: Horizontal Subtle
|
53
|
+
- nav_horizontal_subtle_no_highlight_swift: Horizontal Subtle No Highlight
|
54
|
+
- nav_horizontal_bold_swift: Horizontal Bold
|
55
|
+
- nav_props_swift: ""
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
@@ -13,25 +13,26 @@ import Flex from '../pb_flex/_flex'
|
|
13
13
|
import Icon from '../pb_icon/_icon'
|
14
14
|
import PbReactPopover from '../pb_popover/_popover'
|
15
15
|
import TextInput from '../pb_text_input/_text_input'
|
16
|
+
import { GenericObject } from "../types"
|
16
17
|
|
17
18
|
type PassphraseProps = {
|
18
19
|
aria?: { [key: string]: string },
|
19
20
|
confirmation?: boolean,
|
20
21
|
className?: string,
|
21
|
-
data?:
|
22
|
+
data?: GenericObject,
|
22
23
|
dark?: boolean,
|
23
24
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
24
25
|
id?: string,
|
25
|
-
inputProps?:
|
26
|
+
inputProps?: GenericObject,
|
26
27
|
label?: string,
|
27
|
-
onChange: (inputValue:
|
28
|
+
onChange: (inputValue: string) => void,
|
28
29
|
showTipsBelow?: "always" | "xs" | "sm" | "md" | "lg" | "xl",
|
29
30
|
tips?: Array<string>,
|
30
31
|
uncontrolled?: boolean,
|
31
32
|
value: string,
|
32
33
|
}
|
33
34
|
|
34
|
-
const Passphrase = (props: PassphraseProps) => {
|
35
|
+
const Passphrase = (props: PassphraseProps): React.ReactElement => {
|
35
36
|
const {
|
36
37
|
aria = {},
|
37
38
|
className,
|
@@ -42,7 +43,7 @@ const Passphrase = (props: PassphraseProps) => {
|
|
42
43
|
id,
|
43
44
|
inputProps = {},
|
44
45
|
label = confirmation ? "Confirm Passphrase" : "Passphrase",
|
45
|
-
onChange = () =>
|
46
|
+
onChange = () => undefined,
|
46
47
|
showTipsBelow = "always",
|
47
48
|
tips = [],
|
48
49
|
uncontrolled = false,
|
@@ -84,60 +85,60 @@ const Passphrase = (props: PassphraseProps) => {
|
|
84
85
|
globalProps(props),
|
85
86
|
className
|
86
87
|
)
|
87
|
-
|
88
|
-
|
88
|
+
const dataProps = buildDataProps(data)
|
89
|
+
const htmlProps = buildHtmlProps(htmlOptions)
|
89
90
|
|
90
91
|
const popoverReference = (
|
91
92
|
<CircleIconButton
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
className={tipClass}
|
94
|
+
dark={dark}
|
95
|
+
icon="info-circle"
|
96
|
+
onClick={toggleShowPopover}
|
97
|
+
variant="link"
|
97
98
|
/>
|
98
99
|
)
|
99
100
|
|
100
101
|
return (
|
101
102
|
<div
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
{...ariaProps}
|
104
|
+
{...dataProps}
|
105
|
+
{...htmlProps}
|
106
|
+
className={classes}
|
107
|
+
id={id}
|
107
108
|
>
|
108
109
|
<label>
|
109
110
|
<Flex align="baseline">
|
110
111
|
<Caption
|
111
|
-
|
112
|
-
|
112
|
+
className="passphrase-label"
|
113
|
+
text={label}
|
113
114
|
/>
|
114
115
|
{tips.length > 0 && !confirmation &&
|
115
116
|
<PbReactPopover
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
className="passphrase-tips"
|
118
|
+
closeOnClick="outside"
|
119
|
+
placement="right"
|
120
|
+
reference={popoverReference}
|
121
|
+
shouldClosePopover={handleShouldClosePopover}
|
122
|
+
show={showPopover}
|
122
123
|
>
|
123
124
|
<Flex
|
124
|
-
|
125
|
-
|
125
|
+
align="center"
|
126
|
+
orientation="column"
|
126
127
|
>
|
127
128
|
<Caption
|
128
|
-
|
129
|
-
|
129
|
+
marginBottom="xs"
|
130
|
+
text="Tips for a good passphrase"
|
130
131
|
/>
|
131
132
|
<div>
|
132
133
|
{tips.map((tip, i) => (
|
133
134
|
<Caption
|
134
|
-
|
135
|
-
|
136
|
-
|
135
|
+
key={i}
|
136
|
+
marginBottom="xs"
|
137
|
+
size="xs"
|
137
138
|
>
|
138
139
|
<Icon
|
139
|
-
|
140
|
-
|
140
|
+
icon="shield-check"
|
141
|
+
marginRight="xs"
|
141
142
|
/>
|
142
143
|
{tip}
|
143
144
|
</Caption>
|
@@ -149,30 +150,30 @@ const Passphrase = (props: PassphraseProps) => {
|
|
149
150
|
</Flex>
|
150
151
|
<div className="passphrase-text-input-wrapper">
|
151
152
|
<TextInput
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
153
|
+
className="passphrase-text-input"
|
154
|
+
dark={dark}
|
155
|
+
marginBottom="xs"
|
156
|
+
onChange={handleChange}
|
157
|
+
placeholder="Enter a passphrase..."
|
158
|
+
type={showPassphrase ? "text" : "password"}
|
159
|
+
value={displayValue}
|
160
|
+
{...inputProps}
|
160
161
|
/>
|
161
162
|
<span
|
162
|
-
|
163
|
-
|
163
|
+
className="show-passphrase-icon"
|
164
|
+
onClick={toggleShowPassphrase}
|
164
165
|
>
|
165
166
|
<Body
|
166
|
-
|
167
|
-
|
168
|
-
|
167
|
+
className={showPassphrase ? "hide-icon" : ""}
|
168
|
+
color="light"
|
169
|
+
dark={dark}
|
169
170
|
>
|
170
171
|
<Icon icon="eye-slash" />
|
171
172
|
</Body>
|
172
173
|
<Body
|
173
|
-
|
174
|
-
|
175
|
-
|
174
|
+
className={showPassphrase ? "" : "hide-icon"}
|
175
|
+
color="light"
|
176
|
+
dark={dark}
|
176
177
|
>
|
177
178
|
<Icon icon="eye" />
|
178
179
|
</Body>
|
@@ -7,6 +7,7 @@ import { globalProps } from '../utilities/globalProps'
|
|
7
7
|
import Caption from '../pb_caption/_caption'
|
8
8
|
import Contact from '../pb_contact/_contact'
|
9
9
|
import Person from '../pb_person/_person'
|
10
|
+
import { GenericObject } from '../types'
|
10
11
|
|
11
12
|
type ContactItem = {
|
12
13
|
contactType: string,
|
@@ -17,7 +18,7 @@ type ContactItem = {
|
|
17
18
|
type PersonContactProps = {
|
18
19
|
aria?: { [key: string]: string },
|
19
20
|
className?: string | string[],
|
20
|
-
data?:
|
21
|
+
data?: GenericObject,
|
21
22
|
firstName: string,
|
22
23
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
23
24
|
id?: string,
|
@@ -25,7 +26,7 @@ type PersonContactProps = {
|
|
25
26
|
contacts?: ContactItem[],
|
26
27
|
}
|
27
28
|
|
28
|
-
const PersonContact = (props: PersonContactProps) => {
|
29
|
+
const PersonContact = (props: PersonContactProps): React.ReactElement => {
|
29
30
|
const {
|
30
31
|
aria = {},
|
31
32
|
className,
|
@@ -60,35 +61,35 @@ const PersonContact = (props: PersonContactProps) => {
|
|
60
61
|
|
61
62
|
return (
|
62
63
|
<div
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
64
|
+
{...ariaProps}
|
65
|
+
{...dataProps}
|
66
|
+
{...htmlProps}
|
67
|
+
className={classes}
|
68
|
+
id={id}
|
68
69
|
>
|
69
70
|
<Person
|
70
|
-
|
71
|
-
|
71
|
+
firstName={firstName}
|
72
|
+
lastName={lastName}
|
72
73
|
/>
|
73
74
|
{validContacts().map((contactObject, index) => (
|
74
75
|
<Contact
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
contactDetail={contactObject.contactDetail}
|
77
|
+
contactType={contactObject.contactType}
|
78
|
+
contactValue={contactObject.contactValue}
|
79
|
+
key={`valid-contact-${index}`}
|
79
80
|
/>
|
80
81
|
))}
|
81
82
|
{wrongContacts().map((contactObject, index) => (
|
82
83
|
<div key={`wrong-contact-caption-wrapper-${index}`}>
|
83
84
|
<Caption
|
84
|
-
|
85
|
-
|
86
|
-
|
85
|
+
className="wrong_numbers"
|
86
|
+
key={`wrong-contact-caption-${index}`}
|
87
|
+
text="wrong number"
|
87
88
|
/>
|
88
89
|
<Contact
|
89
|
-
|
90
|
-
|
91
|
-
|
90
|
+
contactType={contactObject.contactType}
|
91
|
+
contactValue={contactObject.contactValue}
|
92
|
+
key={`wrong-contact-${index}`}
|
92
93
|
/>
|
93
94
|
</div>
|
94
95
|
))}
|
@@ -62,6 +62,7 @@ const formatAllCountries = () => {
|
|
62
62
|
formatAllCountries()
|
63
63
|
|
64
64
|
const containOnlyNumbers = (value: string) => {
|
65
|
+
// eslint-disable-next-line no-useless-escape
|
65
66
|
return /^[()+\-\ .\d]*$/g.test(value)
|
66
67
|
}
|
67
68
|
|
@@ -259,9 +260,9 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
|
|
259
260
|
if (required) textInputProps.required = true
|
260
261
|
|
261
262
|
return (
|
262
|
-
<div
|
263
|
-
|
264
|
-
|
263
|
+
<div
|
264
|
+
{...wrapperProps}
|
265
|
+
{...htmlProps}
|
265
266
|
>
|
266
267
|
<TextInput
|
267
268
|
ref={
|
@@ -1,3 +1,4 @@
|
|
1
|
+
/* eslint-disable react/no-multi-comp */
|
1
2
|
import React, { useEffect, useState } from "react";
|
2
3
|
import ReactDOM from "react-dom";
|
3
4
|
import {
|
@@ -54,7 +55,7 @@ const popoverModifiers = ({
|
|
54
55
|
offset,
|
55
56
|
}: {
|
56
57
|
modifiers: Modifier<any> & any;
|
57
|
-
offset:
|
58
|
+
offset: boolean;
|
58
59
|
}) => {
|
59
60
|
return offset ? modifiers.concat([POPOVER_MODIFIERS.offset]) : modifiers;
|
60
61
|
};
|
@@ -143,7 +144,7 @@ const Popover = (props: PbPopoverProps) => {
|
|
143
144
|
);
|
144
145
|
};
|
145
146
|
|
146
|
-
const PbReactPopover = (props: PbPopoverProps) => {
|
147
|
+
const PbReactPopover = (props: PbPopoverProps): React.ReactElement => {
|
147
148
|
const [targetId] = useState(_uniqueId('id-'))
|
148
149
|
const {
|
149
150
|
className,
|
@@ -226,9 +227,10 @@ const PbReactPopover = (props: PbPopoverProps) => {
|
|
226
227
|
<PopperReference>
|
227
228
|
{({ ref }) => (
|
228
229
|
<span
|
229
|
-
id={"reference-" + targetId}
|
230
230
|
className="pb_popover_reference_wrapper"
|
231
|
-
|
231
|
+
id={"reference-" + targetId}
|
232
|
+
ref={ref}
|
233
|
+
>
|
232
234
|
<reference.type {...reference.props} />
|
233
235
|
</span>
|
234
236
|
)}
|
@@ -20,6 +20,14 @@ type ProgressPillsProps = {
|
|
20
20
|
value?: string,
|
21
21
|
}
|
22
22
|
|
23
|
+
const ProgressPill = ({ active, dark, steps: step }: ProgressPillsProps) => (
|
24
|
+
<div
|
25
|
+
className={`pb_progress_pill${step <= active ? '_active' : '_inactive'}${dark ? ' dark' : ''
|
26
|
+
}`}
|
27
|
+
key={step}
|
28
|
+
/>
|
29
|
+
)
|
30
|
+
|
23
31
|
const showSteps = (steps: number, active: number, dark: boolean) => {
|
24
32
|
const items = []
|
25
33
|
|
@@ -30,14 +38,6 @@ const showSteps = (steps: number, active: number, dark: boolean) => {
|
|
30
38
|
return items
|
31
39
|
}
|
32
40
|
|
33
|
-
const ProgressPill = ({ active, dark, steps: step }: ProgressPillsProps) => (
|
34
|
-
<div
|
35
|
-
className={`pb_progress_pill${step <= active ? '_active' : '_inactive'}${dark ? ' dark' : ''
|
36
|
-
}`}
|
37
|
-
key={step}
|
38
|
-
/>
|
39
|
-
)
|
40
|
-
|
41
41
|
const ProgressPills = (props: ProgressPillsProps) => {
|
42
42
|
const {
|
43
43
|
active = 0,
|
@@ -59,24 +59,24 @@ const ProgressPills = (props: ProgressPillsProps) => {
|
|
59
59
|
|
60
60
|
return (
|
61
61
|
<div
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
62
|
+
{...ariaProps}
|
63
|
+
{...dataProps}
|
64
|
+
{...htmlProps}
|
65
|
+
className={classes}
|
66
|
+
id={id}
|
67
67
|
>
|
68
68
|
{title &&
|
69
69
|
<div className="progress_pills_status">
|
70
70
|
<Title
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
dark={dark}
|
72
|
+
size={4}
|
73
|
+
tag="h4"
|
74
|
+
text={title}
|
75
75
|
/>
|
76
76
|
<Body
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
color="light"
|
78
|
+
dark={dark}
|
79
|
+
text={value}
|
80
80
|
/>
|
81
81
|
</div>}
|
82
82
|
<div className="progress_pills">{showSteps(steps, active, dark)}</div>
|
@@ -18,7 +18,7 @@ type ProgressSimpleProps = {
|
|
18
18
|
width: string,
|
19
19
|
}
|
20
20
|
|
21
|
-
const ProgressSimple = (props: ProgressSimpleProps) => {
|
21
|
+
const ProgressSimple = (props: ProgressSimpleProps): React.ReactElement => {
|
22
22
|
const {
|
23
23
|
align,
|
24
24
|
className,
|
@@ -57,9 +57,9 @@ const ProgressSimple = (props: ProgressSimpleProps) => {
|
|
57
57
|
|
58
58
|
return (
|
59
59
|
<div
|
60
|
-
|
61
|
-
|
62
|
-
|
60
|
+
{...dataProps}
|
61
|
+
{...htmlProps}
|
62
|
+
className={wrapperClass}
|
63
63
|
>
|
64
64
|
<div
|
65
65
|
className={kitClass}
|
@@ -7,7 +7,7 @@ import Tooltip from "../../pb_tooltip/_tooltip";
|
|
7
7
|
|
8
8
|
type EditorButtonProps = {
|
9
9
|
classname?: string,
|
10
|
-
onclick?: () =>
|
10
|
+
onclick?: () => undefined | void,
|
11
11
|
icon?: string;
|
12
12
|
text?: string;
|
13
13
|
disable?: boolean
|
@@ -19,29 +19,31 @@ const EditorButton = ({
|
|
19
19
|
onclick,
|
20
20
|
icon,
|
21
21
|
text,
|
22
|
-
}: EditorButtonProps) => {
|
22
|
+
}: EditorButtonProps): React.ReactElement => {
|
23
23
|
return (
|
24
|
-
<Tooltip
|
25
|
-
|
24
|
+
<Tooltip
|
25
|
+
delay={{
|
26
26
|
open: 2000
|
27
27
|
}}
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
interaction
|
29
|
+
placement="top"
|
30
|
+
text={text}
|
31
31
|
>
|
32
32
|
<button
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
className={classname}
|
34
|
+
disabled={disable}
|
35
|
+
onClick={onclick}
|
36
|
+
role="button"
|
37
|
+
type="button"
|
38
38
|
>
|
39
|
-
<Flex
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
<Flex
|
40
|
+
align="center"
|
41
|
+
className="toolbar_button_icon"
|
42
|
+
justify="center"
|
43
43
|
>
|
44
|
-
<Icon icon={icon}
|
44
|
+
<Icon icon={icon}
|
45
|
+
size="lg"
|
46
|
+
/>
|
45
47
|
</Flex>
|
46
48
|
</button>
|
47
49
|
</Tooltip>
|