playbook_ui 13.15.0.pre.alpha.play1141iconkitusinglibrary1956 → 13.15.0.pre.alpha.play10841940

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +33 -40
  3. data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +4 -4
  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/_icon.tsx +5 -21
  11. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +2 -3
  12. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +2 -3
  13. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
  14. data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -1
  15. data/app/pb_kits/playbook/pb_layout/layout.test.js +8 -4
  16. data/app/pb_kits/playbook/pb_legend/_legend.tsx +6 -6
  17. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.tsx +4 -4
  18. data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.tsx +1 -1
  19. data/app/pb_kits/playbook/pb_lightbox/Carousel/index.tsx +3 -3
  20. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +30 -22
  21. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +5 -5
  22. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +4 -4
  23. data/app/pb_kits/playbook/pb_list/_list.tsx +15 -15
  24. data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
  25. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +9 -9
  26. data/app/pb_kits/playbook/pb_map/_map.tsx +8 -8
  27. data/app/pb_kits/playbook/pb_map/_map_controls.tsx +15 -7
  28. data/app/pb_kits/playbook/pb_map/_map_custom_button.tsx +4 -2
  29. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
  30. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +6 -6
  31. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +46 -42
  32. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +20 -20
  33. data/app/pb_kits/playbook/pb_nav/_item.tsx +56 -47
  34. data/app/pb_kits/playbook/pb_nav/_nav.tsx +15 -15
  35. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +50 -51
  36. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +19 -20
  37. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +3 -4
  38. data/app/pb_kits/playbook/pb_popover/_popover.tsx +4 -6
  39. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +20 -20
  40. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +4 -4
  41. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx +17 -19
  42. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts +1 -1
  43. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.tsx +21 -23
  44. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +10 -18
  45. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +23 -46
  46. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx +8 -8
  47. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx +7 -7
  48. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +15 -17
  49. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +7 -9
  50. data/app/pb_kits/playbook/pb_select/_select.scss +4 -13
  51. data/app/pb_kits/playbook/pb_select/_select.tsx +4 -7
  52. data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -2
  53. data/app/pb_kits/playbook/pb_select/docs/index.js +0 -1
  54. data/app/pb_kits/playbook/pb_select/select.rb +1 -6
  55. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +24 -25
  56. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +26 -27
  57. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +1 -2
  58. data/app/pb_kits/playbook/pb_source/_source.tsx +15 -15
  59. data/dist/playbook-rails.js +4 -4
  60. data/lib/playbook/version.rb +1 -1
  61. metadata +2 -4
  62. data/app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.html.erb +0 -24
  63. data/app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.jsx +0 -38
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68f62d23e4cbda324af481e7101e9663b86138dd86b3458639240af7e78256f7
4
- data.tar.gz: 7b6dd2d5c7f139208d3c3e1d0c4cdc2c6e264c84d7119d6ceb414baede5453bf
3
+ metadata.gz: 8762747dc48a11b6a27d5ab2228aa11edc1c352ab4368ffff4b1bd64024ffb61
4
+ data.tar.gz: d072e81d2ce870616f8ea758dc9f9028bc9d75e9ca7892e0fccb62d2a7d4bb50
5
5
  SHA512:
6
- metadata.gz: 383d35c678e65accee31851e57bc179d471887e68af41bbd28a46d13e951a1248a0d1d02dc97ae96628b13ea732a06b022f52943c37a28c9078dfe50036103f2
7
- data.tar.gz: 00d53a7eca9ad1c5d6ad97379083aa12d0e6cdd5ddf6e4ba3983c2b2fda472e1d9e991d39b63f2fa7c80ac38c4ba74b6d2544b37cd1318287420bb715735bb81
6
+ metadata.gz: 84bcf3df0d947ec4efeb7178a111fc3549731590603f2bf9a2306e16d1d2c1ef3afad28969de7a156a445aa0b60dbf153f47e85cbe88c51f68819c40260556f3
7
+ data.tar.gz: c81ddac293d872c804b38c2fa4d3f3c69e7d80a34c59bf4a38b2cadc1915036d6d44c2c4aeb792fc8c61cf0bb872ecf2f7e2e124eaf7c0e7c16db602e1baac1b
@@ -32,10 +32,6 @@ type DatePickerConfig = {
32
32
  } & Pick<BaseOptions, "allowInput" | "defaultDate" | "enableTime" | "maxDate" | "minDate" | "mode" | "plugins" | "position" | "positionElement" >
33
33
 
34
34
  const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HTMLElement) => {
35
- const noop = () => {
36
- // intentionally left empty as a no-op placeholder
37
- }
38
-
39
35
  const {
40
36
  allowInput,
41
37
  closeOnSelect = true,
@@ -49,8 +45,8 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
49
45
  maxDate,
50
46
  minDate,
51
47
  mode,
52
- onChange = noop,
53
- onClose = noop,
48
+ onChange = () => {},
49
+ onClose = () => {},
54
50
  pickerId,
55
51
  plugins,
56
52
  position = "auto",
@@ -76,11 +72,20 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
76
72
  return defaultDate
77
73
  }
78
74
  }
75
+ const disabledParser = () => {
76
+ const disabledArray=[]
77
+
78
+ disableDate && disableDate.length > 0 && disabledArray.push(...disableDate)
79
+ disableRange && disableRange.length > 0 && disabledArray.push(...disableRange)
80
+ disableWeekdays && disableWeekdays.length > 0 && disabledArray.push(...disabledWeekDays())
81
+
82
+ return disabledArray
83
+ }
79
84
 
80
85
  const disabledWeekDays = () => {
81
86
  return (
82
87
  [
83
- (date: any) => {
88
+ (date:any) => {
84
89
  const weekdayObj: {
85
90
  [day: string]: number
86
91
  } = {
@@ -105,16 +110,6 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
105
110
  ]
106
111
  )
107
112
  }
108
-
109
- const disabledParser = () => {
110
- const disabledArray=[]
111
-
112
- disableDate && disableDate.length > 0 && disabledArray.push(...disableDate)
113
- disableRange && disableRange.length > 0 && disabledArray.push(...disableRange)
114
- disableWeekdays && disableWeekdays.length > 0 && disabledArray.push(...disabledWeekDays())
115
-
116
- return disabledArray
117
- }
118
113
  const calendarResizer = () => {
119
114
  const cal = document.querySelector(`#cal-${pickerId}.open`) as HTMLElement
120
115
  const parentInput = cal.parentElement
@@ -130,46 +125,28 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
130
125
 
131
126
  const setPlugins = (thisRangesEndToday: boolean, customQuickPickDates: any) => {
132
127
  const pluginList = []
133
-
128
+
134
129
  // month and week selection
135
130
  if (selectionType === "month" || plugins.length > 0) {
136
131
  pluginList.push(monthSelectPlugin({ shorthand: true, dateFormat: 'F Y', altFormat: 'F Y' }))
137
132
  } else if ( selectionType === "week") {
138
133
  pluginList.push(weekSelect())
139
-
134
+
140
135
  } else if (selectionType === "quickpick") {
141
136
  //------- QUICKPICK VARIANT PLUGIN -------------//
142
137
  pluginList.push(quickPickPlugin(thisRangesEndToday, customQuickPickDates))
143
138
  }
144
-
139
+
145
140
  // time selection
146
141
  if (enableTime) pluginList.push(timeSelectPlugin({ caption: timeCaption, showTimezone: showTimezone}))
147
-
142
+
148
143
  return pluginList
149
144
  }
150
-
145
+
151
146
  const getDateFormat = () => {
152
147
  return enableTime ? `${format} ${timeFormat}` : format
153
148
  }
154
149
 
155
- // Attach / detach to / from scroll events
156
- const initialPicker = document.querySelector<HTMLElement & { [x: string]: any }>(`#${pickerId}`)._flatpickr
157
- const scrollEvent = () => {
158
- initialPicker._positionCalendar()
159
- }
160
- function attachToScroll(scrollParent: string | HTMLElement) {
161
- document.querySelectorAll(scrollParent as string)[0]?.addEventListener("scroll", scrollEvent, { passive: true })
162
- }
163
- function detachFromScroll(scrollParent: string | HTMLElement = document.body) {
164
- document.querySelectorAll(scrollParent as string)[0]?.removeEventListener("scroll", scrollEvent)
165
- }
166
-
167
- // two way binding
168
- const initialDropdown = document.querySelector<HTMLElement & { [x: string]: any }>(`#year-${pickerId}`)
169
- const yearChangeHook = () => {
170
- initialDropdown.value = initialPicker.currentYear
171
- }
172
-
173
150
  // ===========================================================
174
151
  // | Flatpickr initializer w/ config |
175
152
  // ===========================================================
@@ -216,6 +193,17 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
216
193
  const picker = document.querySelector<HTMLElement & { [x: string]: any }>(`#${pickerId}`)._flatpickr
217
194
  picker.innerContainer.parentElement.id = `cal-${pickerId}`
218
195
 
196
+ // Attach / detach to / from scroll events
197
+ const scrollEvent = () => {
198
+ picker._positionCalendar()
199
+ }
200
+ function attachToScroll(scrollParent: string | HTMLElement) {
201
+ document.querySelectorAll(scrollParent as string)[0]?.addEventListener("scroll", scrollEvent, { passive: true })
202
+ }
203
+ function detachFromScroll(scrollParent: string | HTMLElement = document.body) {
204
+ document.querySelectorAll(scrollParent as string)[0]?.removeEventListener("scroll", scrollEvent)
205
+ }
206
+
219
207
  // replace year selector with dropdown
220
208
  picker.yearElements[0].parentElement.innerHTML = `<select class="numInput cur-year" type="number" tabIndex="-1" aria-label="Year" id="year-${pickerId}"></select>`
221
209
 
@@ -254,6 +242,11 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
254
242
  })
255
243
  }
256
244
 
245
+ // two way binding
246
+ const yearChangeHook = () => {
247
+ dropdown.value = picker.currentYear
248
+ }
249
+
257
250
  // Adding dropdown icons to year and month selects
258
251
  dropdown.insertAdjacentHTML('afterend', '<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>')
259
252
  if (picker.monthElements[0].parentElement) {
@@ -53,8 +53,8 @@ const quickPickPlugin = (thisRangesEndToday: boolean, customQuickPickDates: cust
53
53
 
54
54
  const calculateDateRange = (timePeriod: string, amount: number): Date[] => {
55
55
  const endDate = new Date();
56
- const startDate = new Date();
57
-
56
+ let startDate = new Date();
57
+
58
58
  switch (timePeriod) {
59
59
  case 'days':
60
60
  startDate.setDate(endDate.getDate() - amount);
@@ -76,7 +76,7 @@ const quickPickPlugin = (thisRangesEndToday: boolean, customQuickPickDates: cust
76
76
  }
77
77
  return [startDate, endDate];
78
78
  };
79
-
79
+
80
80
 
81
81
  type rangesType = {
82
82
  [key: string]: Date[]
@@ -95,7 +95,7 @@ const quickPickPlugin = (thisRangesEndToday: boolean, customQuickPickDates: cust
95
95
  'Last year': [lastYearStartDate, lastYearEndDate]
96
96
  };
97
97
 
98
-
98
+
99
99
  if (customQuickPickDates && Object.keys(customQuickPickDates).length !== 0) {
100
100
  if (customQuickPickDates.dates.length && customQuickPickDates.override === false) {
101
101
  customQuickPickDates.dates.forEach((item) => {
@@ -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"
@@ -27,7 +27,7 @@ type IconProps = {
27
27
  data?: {[key: string]: string},
28
28
  fixedWidth?: boolean,
29
29
  flip?: "horizontal" | "vertical" | "both" | "none",
30
- icon: any,
30
+ icon: string,
31
31
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
32
32
  id?: string,
33
33
  inverse?: boolean,
@@ -57,7 +57,7 @@ const Icon = (props: IconProps) => {
57
57
  fixedWidth = true,
58
58
  flip = "none",
59
59
  htmlOptions = {},
60
- icon = "",
60
+ icon,
61
61
  id,
62
62
  inverse = false,
63
63
  listItem = false,
@@ -82,15 +82,12 @@ const Icon = (props: IconProps) => {
82
82
 
83
83
  }
84
84
 
85
- const iconString = typeof icon === 'string'
86
- const IconFunction = icon
87
-
88
85
  // Lets check and see if the icon prop is referring to a custom Power icon...
89
86
  // If so, then set fa-icon to "custom"
90
87
  // this ensures the JS will not do any further operations
91
88
  // faClasses[`fa-${icon}`] = customIcon ? 'custom' : icon
92
- if (!customIcon && iconString) faClasses[`fa-${icon}`] = icon
93
-
89
+ if (!customIcon) faClasses[`fa-${icon}`] = icon
90
+
94
91
  const classes = classnames(
95
92
  flipMap[flip],
96
93
  'pb_icon_kit',
@@ -126,19 +123,6 @@ const Icon = (props: IconProps) => {
126
123
  }
127
124
  </>
128
125
  )
129
- else if (!iconString)
130
- return (
131
- <>
132
- <span
133
- {...dataProps}
134
- {...htmlProps}
135
- className="pbiconhere"
136
- id={id}
137
- >
138
- <IconFunction />
139
- </span>
140
- </>
141
- )
142
126
  else if (isValidEmoji(icon))
143
127
  return (
144
128
  <>
@@ -177,4 +161,4 @@ const Icon = (props: IconProps) => {
177
161
  )
178
162
  }
179
163
 
180
- export default Icon
164
+ export default Icon
@@ -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 = {},
@@ -15,7 +15,7 @@ type LabelValueProps = {
15
15
  aria?: { [key: string]: string };
16
16
  className?: string;
17
17
  dark?: boolean;
18
- data?: object;
18
+ data?: Record<string, unknown>;
19
19
  date?: Date;
20
20
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
21
21
  id?: string;
@@ -10,7 +10,7 @@ type LayoutPropTypes = {
10
10
  className?: string,
11
11
  collapse?: "xs" | "sm" | "md" | "lg" | "xl",
12
12
  dark?: boolean,
13
- data?: object,
13
+ data?: Record<string, unknown>,
14
14
  full?: boolean,
15
15
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
16
16
  position?: "left" | "right",
@@ -168,6 +168,7 @@ const Layout = (props: LayoutPropTypes) => {
168
168
  layoutCss,
169
169
  layoutCollapseCss,
170
170
  className,
171
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
171
172
  //@ts-ignore
172
173
  globalProps(filteredProps)
173
174
  )}