playbook_ui 13.15.0.pre.alpha.PLAY10831873 → 13.15.0.pre.alpha.PLAY10851907

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +4 -2
  3. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +5 -3
  4. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +30 -44
  5. data/app/pb_kits/playbook/pb_flex/_flex.tsx +4 -4
  6. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +2 -3
  7. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +4 -7
  8. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +10 -10
  9. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +9 -10
  10. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +2 -3
  11. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +2 -3
  12. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +51 -50
  13. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +20 -19
  14. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +4 -3
  15. data/app/pb_kits/playbook/pb_popover/_popover.tsx +6 -4
  16. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +20 -20
  17. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +4 -4
  18. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx +19 -17
  19. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts +1 -1
  20. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.tsx +23 -21
  21. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +18 -10
  22. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +46 -23
  23. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx +8 -8
  24. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx +7 -7
  25. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +17 -15
  26. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +9 -7
  27. data/app/pb_kits/playbook/pb_select/_select.tsx +1 -1
  28. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +25 -24
  29. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +27 -26
  30. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +2 -1
  31. data/app/pb_kits/playbook/pb_source/_source.tsx +15 -15
  32. data/dist/playbook-rails.js +2 -2
  33. data/lib/playbook/version.rb +1 -1
  34. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c792af7baba55e98e5f05e45c33104f369267fa1acfa30556f96fb650e21ce4
4
- data.tar.gz: e05765a5b49f1c379dcf111ad9085ecaf012083f673776103489d6eef8674842
3
+ metadata.gz: 8c5c9caf58c548d42103ad5d2b62a507a2f5498b66560a157633b11309eea33f
4
+ data.tar.gz: 261e1e3c9d53b1e94ef80c00e3dd157296fd9d56e8c14659f1fd3a0ddd73de87
5
5
  SHA512:
6
- metadata.gz: fe584e4c6307e81a122a08406fc7451e6edbd546e4d83677d0521ebe0b4a7b324b632971ecf1818a9a8886e56aeeaea8bb9ca89efc17079907fa4d3e64f4564e
7
- data.tar.gz: f2552261c54ec7d511e0f007ef7067d681eb65345cc2cc442ba3b191067dfba335eabeede5d8cb42e83203c513b491aa3baa62469c40e695ae3a4cc7724b9c42
6
+ metadata.gz: b39140314f8802986175b032cd4f36a77d5e0575b53b41dcaa1d6365270da7c93944698402e7f4d357859c9cb03248bb2ae09900bef1d62ad26c488890d009db
7
+ data.tar.gz: b3410c5d6842df03da01f4405a92cf12311ba8f819e8dac7915d7cd4b6212491aa6ad7b79921c7a6fd2844b015de28922d41bf02a6439336dbf95112338b79fb
@@ -122,9 +122,11 @@ const highchartsDarkTheme: ThemeProps = {
122
122
  // specific to gauge
123
123
  // unfilled gauge color
124
124
  pane: {
125
- background: [{
125
+ background: {
126
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
127
+ // @ts-ignore
126
128
  borderColor: colors.border_dark,
127
- }],
129
+ },
128
130
  },
129
131
 
130
132
  plotOptions: {
@@ -122,9 +122,11 @@ const highchartsTheme: ThemeProps = {
122
122
  // specific to gauge
123
123
  // unfilled gauge color
124
124
  pane: {
125
- background: [{
126
- borderColor: colors.border_light,
127
- }],
125
+ background: {
126
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
127
+ // @ts-ignore
128
+ borderColor: colors.border_light,
129
+ },
128
130
  },
129
131
 
130
132
  plotOptions: {
@@ -2,8 +2,7 @@ import React, { useEffect, useState } from "react";
2
2
  import classnames from "classnames";
3
3
 
4
4
  import { globalProps } from "../utilities/globalProps";
5
- import { buildHtmlProps } from "../utilities/props";
6
- import { VoidCallback } from "../types";
5
+ import { buildHtmlProps } from '../utilities/props'
7
6
 
8
7
  import Icon from "../pb_icon/_icon";
9
8
  import Title from "../pb_title/_title";
@@ -16,23 +15,23 @@ const iconMap = {
16
15
  };
17
16
 
18
17
  type FixedConfirmationToastProps = {
19
- autoClose?: number;
20
- children?: React.ReactChild[] | React.ReactChild;
21
- className?: string;
22
- closeable?: boolean;
23
- data?: string;
24
- horizontal?: "right" | "left" | "center";
25
- htmlOptions?: { [key: string]: string | number | boolean | (VoidCallback) };
26
- id?: string;
27
- multiLine?: boolean;
28
- onClose?: VoidCallback;
29
- open?: boolean;
30
- status?: "success" | "error" | "neutral" | "tip";
31
- text?: string;
32
- vertical?: "top" | "bottom";
33
- };
18
+ autoClose?: number,
19
+ children?: React.ReactChild[] | React.ReactChild,
20
+ className?: string,
21
+ closeable?: boolean,
22
+ data?: string,
23
+ horizontal?: "right" | "left" | "center",
24
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
25
+ id?: string,
26
+ multiLine?: boolean,
27
+ onClose?: () => void,
28
+ open?: boolean,
29
+ status?: "success" | "error" | "neutral" | "tip",
30
+ text?: string,
31
+ vertical?: "top" | "bottom",
32
+ }
34
33
 
35
- const FixedConfirmationToast = (props: FixedConfirmationToastProps): React.ReactElement => {
34
+ const FixedConfirmationToast = (props: FixedConfirmationToastProps) => {
36
35
  const [showToast, toggleToast] = useState(true);
37
36
  const {
38
37
  autoClose = 0,
@@ -42,7 +41,7 @@ const FixedConfirmationToast = (props: FixedConfirmationToastProps): React.React
42
41
  horizontal,
43
42
  htmlOptions = {},
44
43
  multiLine = false,
45
- onClose = () => undefined,
44
+ onClose = () => { },
46
45
  open = true,
47
46
  status = "neutral",
48
47
  text,
@@ -66,7 +65,7 @@ const FixedConfirmationToast = (props: FixedConfirmationToastProps): React.React
66
65
  onClose();
67
66
  }, autoClose);
68
67
  }
69
- };
68
+ }
70
69
 
71
70
  useEffect(() => {
72
71
  toggleToast(open);
@@ -81,35 +80,22 @@ const FixedConfirmationToast = (props: FixedConfirmationToastProps): React.React
81
80
  return (
82
81
  <>
83
82
  {showToast && (
84
- <div
85
- className={css}
86
- onClick={handleClick}
87
- {...htmlProps}
88
- >
89
- {icon && (
90
- <Icon
91
- className="pb_icon"
92
- fixedWidth
93
- icon={icon}
94
- />
95
- )}
83
+ <div className={css} onClick={handleClick} {...htmlProps}>
84
+ {icon && <Icon className="pb_icon" fixedWidth icon={icon} />}
96
85
 
97
- {(children && children) ||
98
- (text && (
86
+ {
87
+ children && children ||
88
+ text && (
99
89
  <Title
100
- className="pb_fixed_confirmation_toast_text"
101
- size={4}
102
- text={text}
90
+ className="pb_fixed_confirmation_toast_text"
91
+ size={4}
92
+ text={text}
103
93
  />
104
- ))}
94
+ )
95
+ }
105
96
 
106
97
  {closeable && (
107
- <Icon
108
- className="pb_icon"
109
- cursor="pointer"
110
- fixedWidth={false}
111
- icon="times"
112
- />
98
+ <Icon className="pb_icon" cursor="pointer" fixedWidth={false} icon="times" />
113
99
  )}
114
100
  </div>
115
101
  )}
@@ -2,12 +2,12 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
4
  import { GlobalProps, globalProps } from '../utilities/globalProps'
5
- import { GenericObject, Sizes } from '../types'
5
+ import { Sizes } from '../types'
6
6
 
7
7
  type FlexProps = {
8
8
  children: React.ReactChild[] | React.ReactNode,
9
9
  className?: string,
10
- data?: GenericObject,
10
+ data?: object,
11
11
  horizontal?: "left" | "center" | "right" | "stretch" | "none",
12
12
  justify?: "start" | "center" | "end" | "around" | "between" | "evenly" | "none",
13
13
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
@@ -25,7 +25,7 @@ type FlexProps = {
25
25
  alignSelf?: "start" | "end" | "center" | "stretch" | "none"
26
26
  } & GlobalProps
27
27
 
28
- const Flex = (props: FlexProps): React.ReactElement => {
28
+ const Flex = (props: FlexProps) => {
29
29
  const {
30
30
  align = 'none',
31
31
  children,
@@ -45,7 +45,7 @@ const Flex = (props: FlexProps): React.ReactElement => {
45
45
  wrap = false,
46
46
  alignSelf = 'none',
47
47
  } = props
48
-
48
+
49
49
  const orientationClass =
50
50
  orientation !== undefined ? `orientation_${orientation}` : ''
51
51
  const justifyClass =
@@ -2,19 +2,18 @@ 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 { GenericObject } from '../types'
6
5
 
7
6
  type FormGroupProps = {
8
7
  aria?: {[key: string]: string},
9
8
  children?: Node,
10
9
  className?: string,
11
- data?: GenericObject,
10
+ data?: object,
12
11
  fullWidth?: boolean,
13
12
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
14
13
  id?: string,
15
14
  }
16
15
 
17
- const FormGroup = (props: FormGroupProps): React.ReactElement => {
16
+ const FormGroup = (props: FormGroupProps) => {
18
17
  const {
19
18
  aria = {},
20
19
  className,
@@ -22,16 +22,16 @@ type FormPillProps = {
22
22
  onClick?: React.MouseEventHandler<HTMLSpanElement>,
23
23
  onMouseDown?: React.MouseEventHandler<HTMLSpanElement>,
24
24
  onTouchEnd?: React.TouchEventHandler<HTMLSpanElement>,
25
- },
25
+ },
26
26
  } & GlobalProps
27
- const FormPill = (props: FormPillProps): React.ReactElement => {
27
+ const FormPill = (props: FormPillProps) => {
28
28
  const {
29
29
  className,
30
30
  htmlOptions = {},
31
31
  id,
32
32
  text,
33
33
  name,
34
- onClick = () => undefined,
34
+ onClick = () => {},
35
35
  avatarUrl,
36
36
  closeProps = {},
37
37
  size = '',
@@ -48,10 +48,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
48
48
  const htmlProps = buildHtmlProps(htmlOptions)
49
49
 
50
50
  return (
51
- <div className={css}
52
- id={id}
53
- {...htmlProps}
54
- >
51
+ <div className={css} id={id} {...htmlProps}>
55
52
  {name &&
56
53
  <>
57
54
  <Avatar
@@ -12,13 +12,12 @@ import typography from "../tokens/exports/_typography.scss";
12
12
 
13
13
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
14
14
  import { globalProps } from "../utilities/globalProps";
15
- import { GenericObject } from "../types";
16
15
 
17
16
  type GaugeProps = {
18
17
  aria: { [key: string]: string };
19
18
  className?: string;
20
19
  chartData?: { name: string; value: number[] | number }[];
21
- dark?: boolean;
20
+ dark?: Boolean;
22
21
  data?: { [key: string]: string };
23
22
  disableAnimation?: boolean;
24
23
  fullCircle?: boolean;
@@ -34,12 +33,13 @@ type GaugeProps = {
34
33
  title?: string;
35
34
  tooltipHtml?: string;
36
35
  colors: string[];
37
- minorTickInterval?: number;
36
+ minorTickInterval: any;
38
37
  circumference: number[];
39
38
  };
40
39
 
41
40
  const Gauge = ({
42
41
  aria = {},
42
+ className,
43
43
  chartData,
44
44
  dark = false,
45
45
  data = {},
@@ -61,9 +61,9 @@ const Gauge = ({
61
61
  minorTickInterval = null,
62
62
  circumference = fullCircle ? [0, 360] : [-100, 100],
63
63
  ...props
64
- }: GaugeProps): React.ReactElement => {
64
+ }: GaugeProps) => {
65
65
  const ariaProps = buildAriaProps(aria);
66
- const dataProps = buildDataProps(data)
66
+ const dataProps = buildDataProps(data)
67
67
  const htmlProps = buildHtmlProps(htmlOptions);
68
68
  highchartsMore(Highcharts);
69
69
  solidGauge(Highcharts);
@@ -89,7 +89,7 @@ const Gauge = ({
89
89
  const [options, setOptions] = useState({});
90
90
 
91
91
  useEffect(() => {
92
- const formattedChartData = chartData.map((obj: GenericObject) => {
92
+ const formattedChartData = chartData.map((obj: any) => {
93
93
  obj.y = obj.value;
94
94
  delete obj.value;
95
95
  return obj;
@@ -185,20 +185,20 @@ const Gauge = ({
185
185
  .querySelectorAll(".fix")
186
186
  .forEach((fix) => fix.setAttribute("y", "38"));
187
187
  }
188
- // eslint-disable-next-line react-hooks/exhaustive-deps
188
+
189
189
  }, [chartData]);
190
190
 
191
191
  return (
192
192
  <HighchartsReact
193
- containerProps={{
193
+ containerProps={{
194
194
  className: classnames(css, globalProps(props)),
195
195
  id: id,
196
196
  ...ariaProps,
197
197
  ...dataProps,
198
198
  ...htmlProps,
199
199
  }}
200
- highcharts={Highcharts}
201
- options={options}
200
+ highcharts={Highcharts}
201
+ options={options}
202
202
  />
203
203
  );
204
204
  };
@@ -8,7 +8,6 @@ import Body from '../pb_body/_body'
8
8
  import Hashtag from '../pb_hashtag/_hashtag'
9
9
  import Title from '../pb_title/_title'
10
10
  import { buildAriaProps, buildDataProps, buildHtmlProps } from '../utilities/props'
11
- import { GenericObject } from '../types'
12
11
 
13
12
  type HomeAddressStreetProps = {
14
13
  aria?: { [key: string]: string },
@@ -29,7 +28,7 @@ type HomeAddressStreetProps = {
29
28
  territory: string,
30
29
  }
31
30
 
32
- const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement => {
31
+ const HomeAddressStreet = (props: HomeAddressStreetProps) => {
33
32
  const {
34
33
  address,
35
34
  addressCont,
@@ -59,17 +58,17 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
59
58
  className
60
59
  )
61
60
 
62
- const dataProps: GenericObject = buildDataProps(data)
63
- const ariaProps: GenericObject = buildAriaProps(aria)
61
+ const dataProps: { [key: string]: any } = buildDataProps(data)
62
+ const ariaProps: { [key: string]: any } = buildAriaProps(aria)
64
63
  const htmlProps = buildHtmlProps(htmlOptions)
65
64
  return (
66
- <div
67
- className={classes(className, dark)}
68
- {...ariaProps}
69
- {...dataProps}
70
- {...htmlProps}
65
+ <div
66
+ className={classes(className, dark)}
67
+ {...ariaProps}
68
+ {...dataProps}
69
+ {...htmlProps}
71
70
  >
72
- {emphasis == 'street' &&
71
+ {emphasis == 'street' &&
73
72
  <div>
74
73
  <Title
75
74
  className="pb_home_address_street_address"
@@ -9,12 +9,11 @@ import Caption from '../pb_caption/_caption'
9
9
  import Flex from '../pb_flex/_flex'
10
10
  import IconCircle from '../pb_icon_circle/_icon_circle'
11
11
  import Title from '../pb_title/_title'
12
- import { GenericObject } from '../types'
13
12
 
14
13
  type IconStatValueProps = {
15
14
  aria?: { [key: string]: string },
16
15
  className?: string,
17
- data?: GenericObject,
16
+ data?: object,
18
17
  dark?: boolean,
19
18
  icon: string,
20
19
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
@@ -35,7 +34,7 @@ type IconStatValueProps = {
35
34
  | "green",
36
35
  }
37
36
 
38
- const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
37
+ const IconStatValue = (props: IconStatValueProps) => {
39
38
  const {
40
39
  aria = {},
41
40
  className,
@@ -6,21 +6,20 @@ import { globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Body from '../pb_body/_body'
8
8
  import Icon from '../pb_icon/_icon'
9
- import { GenericObject } from '../types'
10
9
 
11
10
  type IconValueProps = {
12
11
  align?: "left" | "center" | "right",
13
12
  aria?: { [key: string]: string; },
14
13
  className?: string,
15
14
  dark?: boolean,
16
- data?: GenericObject,
15
+ data?: object,
17
16
  icon: string,
18
17
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
19
18
  id?: string,
20
19
  text: string,
21
20
  }
22
21
 
23
- const IconValue = (props: IconValueProps): React.ReactElement => {
22
+ const IconValue = (props: IconValueProps) => {
24
23
  const {
25
24
  align = 'left',
26
25
  aria = {},
@@ -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?: object,
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: String) => void,
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
- const dataProps = buildDataProps(data)
88
- const htmlProps = buildHtmlProps(htmlOptions)
88
+ const dataProps = buildDataProps(data)
89
+ const htmlProps = buildHtmlProps(htmlOptions)
89
90
 
90
91
  const popoverReference = (
91
92
  <CircleIconButton
92
- className={tipClass}
93
- dark={dark}
94
- icon="info-circle"
95
- onClick={toggleShowPopover}
96
- variant="link"
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
- {...ariaProps}
103
- {...dataProps}
104
- {...htmlProps}
105
- className={classes}
106
- id={id}
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
- className="passphrase-label"
112
- text={label}
112
+ className="passphrase-label"
113
+ text={label}
113
114
  />
114
115
  {tips.length > 0 && !confirmation &&
115
116
  <PbReactPopover
116
- className="passphrase-tips"
117
- closeOnClick="outside"
118
- placement="right"
119
- reference={popoverReference}
120
- shouldClosePopover={handleShouldClosePopover}
121
- show={showPopover}
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
- align="center"
125
- orientation="column"
125
+ align="center"
126
+ orientation="column"
126
127
  >
127
128
  <Caption
128
- marginBottom="xs"
129
- text="Tips for a good passphrase"
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
- key={i}
135
- marginBottom="xs"
136
- size="xs"
135
+ key={i}
136
+ marginBottom="xs"
137
+ size="xs"
137
138
  >
138
139
  <Icon
139
- icon="shield-check"
140
- marginRight="xs"
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
- className="passphrase-text-input"
153
- dark={dark}
154
- marginBottom="xs"
155
- onChange={handleChange}
156
- placeholder="Enter a passphrase..."
157
- type={showPassphrase ? "text" : "password"}
158
- value={displayValue}
159
- {...inputProps}
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
- className="show-passphrase-icon"
163
- onClick={toggleShowPassphrase}
163
+ className="show-passphrase-icon"
164
+ onClick={toggleShowPassphrase}
164
165
  >
165
166
  <Body
166
- className={showPassphrase ? "hide-icon" : ""}
167
- color="light"
168
- dark={dark}
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
- className={showPassphrase ? "" : "hide-icon"}
174
- color="light"
175
- dark={dark}
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?: object,
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
- {...ariaProps}
64
- {...dataProps}
65
- {...htmlProps}
66
- className={classes}
67
- id={id}
64
+ {...ariaProps}
65
+ {...dataProps}
66
+ {...htmlProps}
67
+ className={classes}
68
+ id={id}
68
69
  >
69
70
  <Person
70
- firstName={firstName}
71
- lastName={lastName}
71
+ firstName={firstName}
72
+ lastName={lastName}
72
73
  />
73
74
  {validContacts().map((contactObject, index) => (
74
75
  <Contact
75
- contactDetail={contactObject.contactDetail}
76
- contactType={contactObject.contactType}
77
- contactValue={contactObject.contactValue}
78
- key={`valid-contact-${index}`}
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
- className="wrong_numbers"
85
- key={`wrong-contact-caption-${index}`}
86
- text="wrong number"
85
+ className="wrong_numbers"
86
+ key={`wrong-contact-caption-${index}`}
87
+ text="wrong number"
87
88
  />
88
89
  <Contact
89
- contactType={contactObject.contactType}
90
- contactValue={contactObject.contactValue}
91
- key={`wrong-contact-${index}`}
90
+ contactType={contactObject.contactType}
91
+ contactValue={contactObject.contactValue}
92
+ key={`wrong-contact-${index}`}
92
93
  />
93
94
  </div>
94
95
  ))}