playbook_ui 14.22.0.pre.alpha.PLAY2281atcustomheaderrails8968 → 14.22.0.pre.alpha.PLAY2292advancedtablepinnedrowsloading8630

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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +5 -3
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header.md +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -8
  5. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +1 -5
  6. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -36
  7. data/app/pb_kits/playbook/pb_badge/_badge.scss +6 -5
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +15 -33
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +72 -0
  10. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +6 -0
  11. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +15 -33
  12. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +22 -52
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +16 -12
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +15 -31
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +16 -39
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +38 -86
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +15 -32
  18. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
  19. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
  20. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +22 -72
  21. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +1 -1
  22. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +15 -31
  23. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +16 -37
  24. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +3 -1
  25. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +3 -1
  26. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +2 -0
  27. data/app/pb_kits/playbook/pb_body/docs/_body_truncate.jsx +3 -3
  28. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +1 -36
  29. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +26 -71
  30. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +16 -29
  31. data/app/pb_kits/playbook/pb_circle_chart/docs/{_circle_chart_colors_rails.md → _circle_chart_colors.md} +1 -1
  32. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +16 -28
  33. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +2 -4
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +15 -23
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +51 -81
  36. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +75 -103
  37. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +6 -3
  38. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +13 -19
  39. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +38 -0
  40. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +1 -0
  41. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +17 -30
  42. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +20 -34
  43. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +20 -29
  44. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +20 -28
  45. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +1 -0
  46. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -0
  47. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +4 -12
  48. data/app/pb_kits/playbook/pb_draggable/context/types.ts +2 -5
  49. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +17 -27
  50. data/app/pb_kits/playbook/pb_title/docs/_title_truncate.jsx +3 -3
  51. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +0 -1
  52. data/app/pb_kits/playbook/pb_tooltip/index.js +36 -59
  53. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +2 -9
  54. data/dist/chunks/{_typeahead-B1tu_vWi.js → _typeahead-B7FRYVtS.js} +3 -3
  55. data/dist/chunks/{_weekday_stacked-CKk0dR5s.js → _weekday_stacked-D5re2fT9.js} +2 -2
  56. data/dist/chunks/{lib-DYpq0k8j.js → lib-Carqm8Ip.js} +1 -1
  57. data/dist/chunks/{pb_form_validation-BUOKwfvW.js → pb_form_validation-DqRmTS8m.js} +1 -1
  58. data/dist/chunks/vendor.js +1 -1
  59. data/dist/menu.yml +8 -68
  60. data/dist/playbook-doc.js +2 -2
  61. data/dist/playbook-rails-react-bindings.js +1 -1
  62. data/dist/playbook-rails.js +1 -1
  63. data/dist/playbook.css +1 -1
  64. data/lib/playbook/version.rb +1 -1
  65. metadata +16 -21
  66. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb +0 -51
  67. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.md +0 -1
  68. data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +0 -106
  69. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
  70. data/app/pb_kits/playbook/pb_body/docs/_body_truncate_react.md +0 -4
  71. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
  72. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
  73. data/app/pb_kits/playbook/pb_title/docs/_title_truncate_react.md +0 -4
  74. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.html.erb +0 -14
  75. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open_rails.md +0 -1
  76. data/dist/chunks/_circle_chart-BZmlhBs2.js +0 -1
  77. /data/app/pb_kits/playbook/pb_body/docs/{_body_truncate_rails.md → _body_truncate.md} +0 -0
  78. /data/app/pb_kits/playbook/pb_title/docs/{_title_truncate_rails.md → _title_truncate.md} +0 -0
  79. /data/app/pb_kits/playbook/pb_tooltip/docs/{_tooltip_click_open_react.md → _tooltip_click_open.md} +0 -0
@@ -3,7 +3,7 @@ import { InitialStateType, ActionType, DraggableProviderType } from "./types";
3
3
 
4
4
  const initialState: InitialStateType = {
5
5
  items: [],
6
- dragData: { id: "", initialGroup: "", originId: "" },
6
+ dragData: { id: "", initialGroup: "" },
7
7
  isDragging: "",
8
8
  activeContainer: ""
9
9
  };
@@ -60,8 +60,7 @@ export const DraggableProvider = ({
60
60
  onDragEnd,
61
61
  onDrop,
62
62
  onDragOver,
63
- dropZone = { type: 'ghost', color: 'neutral', direction: 'vertical' },
64
- providerId = 'default', // fallback provided for backward compatibility, so this does not become a required prop
63
+ dropZone = { type: 'ghost', color: 'neutral', direction: 'vertical' }
65
64
  }: DraggableProviderType) => {
66
65
  const [state, dispatch] = useReducer(reducer, initialState);
67
66
 
@@ -94,17 +93,15 @@ export const DraggableProvider = ({
94
93
  }, [state.items]);
95
94
 
96
95
  const handleDragStart = (id: string, container: string) => {
97
- dispatch({ type: 'SET_DRAG_DATA', payload: { id: id, initialGroup: container, originId: providerId } });
96
+ dispatch({ type: 'SET_DRAG_DATA', payload: { id: id, initialGroup: container } });
98
97
  dispatch({ type: 'SET_IS_DRAGGING', payload: id });
99
98
  if (onDragStart) onDragStart(id, container);
100
99
  };
101
100
 
102
101
  const handleDragEnter = (id: string, container: string) => {
103
- if (state.dragData.originId !== providerId) return; // Ignore drag events from other providers
104
-
105
102
  if (state.dragData.id !== id) {
106
103
  dispatch({ type: 'REORDER_ITEMS', payload: { dragId: state.dragData.id, targetId: id } });
107
- dispatch({ type: 'SET_DRAG_DATA', payload: { id: state.dragData.id, initialGroup: container, originId: providerId } });
104
+ dispatch({ type: 'SET_DRAG_DATA', payload: { id: state.dragData.id, initialGroup: container } });
108
105
  }
109
106
  if (onDragEnter) onDragEnter(id, container);
110
107
  };
@@ -112,7 +109,6 @@ export const DraggableProvider = ({
112
109
  const handleDragEnd = () => {
113
110
  dispatch({ type: 'SET_IS_DRAGGING', payload: "" });
114
111
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: "" });
115
- dispatch({ type: 'SET_DRAG_DATA', payload: { id: "", initialGroup: "", originId: "" } });
116
112
  if (onDragEnd) onDragEnd();
117
113
  };
118
114
 
@@ -121,8 +117,6 @@ export const DraggableProvider = ({
121
117
  };
122
118
 
123
119
  const handleDrop = (container: string) => {
124
- if (state.dragData.originId !== providerId) return; // Ignore drop events from other providers
125
-
126
120
  dispatch({ type: 'SET_IS_DRAGGING', payload: "" });
127
121
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: "" });
128
122
  changeCategory(state.dragData.id, container);
@@ -130,8 +124,6 @@ export const DraggableProvider = ({
130
124
  };
131
125
 
132
126
  const handleDragOver = (e: Event, container: string) => {
133
- if (state.dragData.originId !== providerId) return; // Ignore drag over events from other providers
134
-
135
127
  e.preventDefault();
136
128
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: container });
137
129
  if (onDragOver) onDragOver(e, container);
@@ -6,16 +6,14 @@ export interface ItemType {
6
6
 
7
7
  export interface InitialStateType {
8
8
  items: ItemType[];
9
- dragData: { id: string; initialGroup: string, originId?: string };
9
+ dragData: { id: string; initialGroup: string };
10
10
  isDragging: string;
11
11
  activeContainer: string;
12
12
  }
13
13
 
14
14
  export type ActionType =
15
15
  | { type: 'SET_ITEMS'; payload: ItemType[] }
16
- | { type: 'SET_DRAG_DATA'; payload: {
17
- originId: string; id: string; initialGroup: string
18
- } }
16
+ | { type: 'SET_DRAG_DATA'; payload: { id: string; initialGroup: string } }
19
17
  | { type: 'SET_IS_DRAGGING'; payload: string }
20
18
  | { type: 'SET_ACTIVE_CONTAINER'; payload: string }
21
19
  | { type: 'CHANGE_CATEGORY'; payload: { itemId: string; container: string } }
@@ -37,5 +35,4 @@ export type ActionType =
37
35
  onDrop?: (container: string) => void;
38
36
  onDragOver?: (e: Event, container: string) => void;
39
37
  dropZone?: DropZoneConfig | string; // Can accept string for backward compatibility
40
- providerId?: string;
41
38
  }
@@ -68,7 +68,7 @@ const containOnlyNumbers = (value: string) => {
68
68
  return /^[()+\-\ .\d]*$/g.test(value)
69
69
  }
70
70
 
71
- const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>) => {
71
+ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefObject<unknown>) => {
72
72
  const {
73
73
  aria = {},
74
74
  className,
@@ -106,16 +106,15 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
106
106
  className
107
107
  )
108
108
 
109
- const inputRef = useRef<HTMLInputElement | null>(null)
109
+ const inputRef = useRef<HTMLInputElement>()
110
110
  const itiRef = useRef<any>(null);
111
111
  const [inputValue, setInputValue] = useState(value)
112
112
  const [error, setError] = useState(props.error)
113
113
  const [dropDownIsOpen, setDropDownIsOpen] = useState(false)
114
114
  const [selectedData, setSelectedData] = useState()
115
- const [hasTyped, setHasTyped] = useState(false)
116
115
 
117
116
  useEffect(() => {
118
- if ((error ?? '').length > 0) {
117
+ if (error?.length > 0) {
119
118
  onValidate(false)
120
119
  } else {
121
120
  onValidate(true)
@@ -132,7 +131,6 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
132
131
  clearField() {
133
132
  setInputValue("")
134
133
  setError("")
135
- setHasTyped(false)
136
134
  },
137
135
  inputNode() {
138
136
  return inputRef.current
@@ -203,8 +201,6 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
203
201
  }
204
202
 
205
203
  const validateErrors = () => {
206
- if (!hasTyped && !error) return
207
-
208
204
  if (itiRef.current) isValid(itiRef.current.isValidNumber())
209
205
  if (validateOnlyNumbers(itiRef.current)) return
210
206
  if (validateTooLongNumber(itiRef.current)) return
@@ -218,7 +214,6 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
218
214
  }
219
215
 
220
216
  const handleOnChange = (evt: React.ChangeEvent<HTMLInputElement>) => {
221
- if (!hasTyped) setHasTyped(true)
222
217
  setInputValue(evt.target.value)
223
218
  let phoneNumberData
224
219
  if (formatAsYouType) {
@@ -264,17 +259,16 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
264
259
 
265
260
  itiRef.current = telInputInit;
266
261
 
267
- if (inputRef.current) {
268
- inputRef.current.addEventListener("countrychange", (evt: Event) => {
269
- const phoneNumberData = getCurrentSelectedData(telInputInit, (evt.target as HTMLInputElement).value)
270
- setSelectedData(phoneNumberData)
271
- onChange(phoneNumberData)
272
- validateErrors()
273
- })
262
+ inputRef.current.addEventListener("countrychange", (evt: Event) => {
263
+ const phoneNumberData = getCurrentSelectedData(telInputInit, (evt.target as HTMLInputElement).value)
264
+ setSelectedData(phoneNumberData)
265
+ onChange(phoneNumberData)
266
+ validateErrors()
267
+ })
268
+
269
+ inputRef.current.addEventListener("open:countrydropdown", () => setDropDownIsOpen(true))
270
+ inputRef.current.addEventListener("close:countrydropdown", () => setDropDownIsOpen(false))
274
271
 
275
- inputRef.current.addEventListener("open:countrydropdown", () => setDropDownIsOpen(true))
276
- inputRef.current.addEventListener("close:countrydropdown", () => setDropDownIsOpen(false))
277
- }
278
272
  if (formatAsYouType) {
279
273
  inputRef.current?.addEventListener("input", (evt) => {
280
274
  handleOnChange(evt as unknown as React.ChangeEvent<HTMLInputElement>);
@@ -309,16 +303,12 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
309
303
  {...htmlProps}
310
304
  >
311
305
  <TextInput
312
- ref={inputNode => {
313
- if (ref) {
314
- if (typeof ref === 'function') {
315
- ref(inputNode)
316
- } else {
317
- (ref as React.MutableRefObject<HTMLInputElement | null>).current = inputNode
318
- }
306
+ ref={
307
+ inputNode => {
308
+ ref ? ref.current = inputNode : null
309
+ inputRef.current = inputNode
319
310
  }
320
- inputRef.current = inputNode
321
- }}
311
+ }
322
312
  {...textInputProps}
323
313
  />
324
314
  </div>
@@ -20,7 +20,7 @@ const TitleTruncate = (props) => {
20
20
  marginBottom="md"
21
21
  size={4}
22
22
  text={lorem}
23
- truncate={1}
23
+ truncate="1"
24
24
  {...props}
25
25
  />
26
26
 
@@ -32,7 +32,7 @@ const TitleTruncate = (props) => {
32
32
  marginBottom="md"
33
33
  size={4}
34
34
  text={lorem}
35
- truncate={2}
35
+ truncate="2"
36
36
  {...props}
37
37
  />
38
38
 
@@ -43,7 +43,7 @@ const TitleTruncate = (props) => {
43
43
  <Title
44
44
  size={4}
45
45
  text={lorem}
46
- truncate={3}
46
+ truncate="3"
47
47
  {...props}
48
48
  />
49
49
  </Flex>
@@ -9,7 +9,6 @@ examples:
9
9
  - tooltip_with_icon_circle: Icon Circle Tooltip
10
10
  - tooltip_delay_rails: Delay
11
11
  - tooltip_show_tooltip: Show Tooltip
12
- - tooltip_click_open: Click to Open
13
12
 
14
13
  react:
15
14
  - tooltip_default_react: Default
@@ -19,75 +19,60 @@ export default class PbTooltip extends PbEnhancedElement {
19
19
  }
20
20
 
21
21
  this.triggerElements.forEach((trigger) => {
22
- const method = this.effectiveTriggerMethod
22
+ const method = this.triggerMethod
23
23
  const interactionEnabled = this.tooltipInteraction
24
24
 
25
25
  if (method === 'click') {
26
- trigger.addEventListener('click', (e) => {
27
- if (this.useClickToOpen) {
28
- e.preventDefault()
29
- if (this.isTooltipVisible()) {
30
- this.hideTooltip()
31
- } else {
32
- this.showTooltip(trigger)
33
- }
34
- } else {
35
- this.showTooltip(trigger)
36
- }
26
+ trigger.addEventListener('click', () => {
27
+ this.showTooltip(trigger)
37
28
  })
38
29
  } else {
39
- if (!this.useClickToOpen) {
40
- trigger.addEventListener('mouseenter', () => {
41
- clearSafeZoneListener(this)
42
- clearTimeout(this.mouseleaveTimeout)
43
- this.currentTrigger = trigger
44
- const delayOpen = this.delayOpen ? parseInt(this.delayOpen) : TOOLTIP_TIMEOUT
45
- this.mouseenterTimeout = setTimeout(() => {
46
- this.showTooltip(trigger)
47
- if (interactionEnabled) {
48
- this.checkCloseTooltip(trigger)
49
- }
50
- }, delayOpen)
51
- })
30
+ trigger.addEventListener('mouseenter', () => {
31
+ clearSafeZoneListener(this)
32
+ clearTimeout(this.mouseleaveTimeout)
33
+ this.currentTrigger = trigger
34
+ const delayOpen = this.delayOpen ? parseInt(this.delayOpen) : TOOLTIP_TIMEOUT
35
+ this.mouseenterTimeout = setTimeout(() => {
36
+ this.showTooltip(trigger)
37
+ if (interactionEnabled) {
38
+ this.checkCloseTooltip(trigger)
39
+ }
40
+ }, delayOpen)
41
+ })
52
42
 
53
- trigger.addEventListener('mouseleave', () => {
54
- clearTimeout(this.mouseenterTimeout)
55
- if (this.delayClose) {
56
- const delayClose = parseInt(this.delayClose)
57
- this.mouseleaveTimeout = setTimeout(() => {
58
- if (interactionEnabled) {
59
- this.attachSafeZoneListener()
60
- } else {
61
- this.hideTooltip()
62
- }
63
- }, delayClose)
64
- } else {
43
+ trigger.addEventListener('mouseleave', () => {
44
+ clearTimeout(this.mouseenterTimeout)
45
+ if (this.delayClose) {
46
+ const delayClose = parseInt(this.delayClose)
47
+ this.mouseleaveTimeout = setTimeout(() => {
65
48
  if (interactionEnabled) {
66
49
  this.attachSafeZoneListener()
67
50
  } else {
68
51
  this.hideTooltip()
69
52
  }
53
+ }, delayClose)
54
+ } else {
55
+ if (interactionEnabled) {
56
+ this.attachSafeZoneListener()
57
+ } else {
58
+ this.hideTooltip()
70
59
  }
71
- })
60
+ }
61
+ })
72
62
 
73
- if (interactionEnabled) {
74
- this.tooltip.addEventListener('mouseenter', () => {
75
- clearSafeZoneListener(this)
76
- })
63
+ if (interactionEnabled) {
64
+ this.tooltip.addEventListener('mouseenter', () => {
65
+ clearSafeZoneListener(this)
66
+ })
77
67
 
78
- this.tooltip.addEventListener('mouseleave', () => {
79
- this.attachSafeZoneListener()
80
- })
81
- }
68
+ this.tooltip.addEventListener('mouseleave', () => {
69
+ this.attachSafeZoneListener()
70
+ })
82
71
  }
83
72
  }
84
73
  })
85
74
  }
86
75
 
87
- isTooltipVisible() {
88
- return this.tooltip && this.tooltip.classList.contains('show')
89
- }
90
-
91
76
  attachSafeZoneListener() {
92
77
  clearSafeZoneListener(this)
93
78
  this.safeZoneHandler = (e) => {
@@ -160,7 +145,7 @@ export default class PbTooltip extends PbEnhancedElement {
160
145
 
161
146
  this.tooltip.classList.add('show')
162
147
 
163
- if (this.effectiveTriggerMethod === 'click' && !this.useClickToOpen) {
148
+ if (this.triggerMethod === 'click') {
164
149
  clearTimeout(this.autoHideTimeout)
165
150
  this.autoHideTimeout = setTimeout(() => {
166
151
  this.hideTooltip()
@@ -239,14 +224,6 @@ export default class PbTooltip extends PbEnhancedElement {
239
224
  return this.element.dataset.pbTooltipTriggerMethod || 'hover'
240
225
  }
241
226
 
242
- get useClickToOpen() {
243
- return this.element.dataset.pbTooltipUseClickToOpen === 'true'
244
- }
245
-
246
- get effectiveTriggerMethod() {
247
- return this.useClickToOpen ? 'click' : this.triggerMethod
248
- }
249
-
250
227
  get tooltipInteraction() {
251
228
  return this.element.dataset.pbTooltipInteraction === 'true'
252
229
  }
@@ -21,8 +21,6 @@ module Playbook
21
21
  prop :trigger_method, type: Playbook::Props::Enum,
22
22
  values: %w[hover click],
23
23
  default: "hover"
24
- prop :use_click_to_open, type: Playbook::Props::Boolean,
25
- default: false
26
24
  prop :width
27
25
 
28
26
  def classname
@@ -48,10 +46,6 @@ module Playbook
48
46
  out
49
47
  end
50
48
 
51
- def effective_trigger_method
52
- use_click_to_open ? "click" : (trigger_method || "hover")
53
- end
54
-
55
49
  def data
56
50
  data = Hash(values[:data]).merge(
57
51
  pb_tooltip_kit: true,
@@ -60,9 +54,8 @@ module Playbook
60
54
  pb_tooltip_trigger_element_id: trigger_element_id,
61
55
  pb_tooltip_tooltip_id: tooltip_id,
62
56
  pb_tooltip_show_tooltip: true,
63
- pb_tooltip_trigger_method: effective_trigger_method,
64
- pb_tooltip_interaction: interaction,
65
- pb_tooltip_use_click_to_open: use_click_to_open
57
+ pb_tooltip_trigger_method: trigger_method,
58
+ pb_tooltip_interaction: interaction
66
59
  )
67
60
  data = data.merge(pb_tooltip_delay_open: delay_open) if delay_open
68
61
  data = data.merge(pb_tooltip_delay_close: delay_close) if delay_close