playbook_ui 14.16.0.pre.alpha.PBNTR881advancedtablefullscreen6884 → 14.16.0.pre.alpha.PBNTR881advancedtablefullscreen6929

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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +11 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -4
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +72 -33
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +4 -4
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +4 -4
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +1 -1
  8. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +34 -34
  9. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
  10. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +16 -0
  11. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
  12. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
  13. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +28 -24
  14. data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +3 -4
  15. data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +2 -3
  16. data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
  17. data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
  18. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +2 -1
  19. data/app/pb_kits/playbook/pb_tooltip/index.js +183 -56
  20. data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
  21. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
  22. data/app/pb_kits/playbook/utilities/object.test.js +149 -1
  23. data/app/pb_kits/playbook/utilities/object.ts +124 -42
  24. data/dist/chunks/{_typeahead-N-EFroAX.js → _typeahead-Djo6qCne.js} +3 -3
  25. data/dist/chunks/_weekday_stacked-Di1bvE_E.js +45 -0
  26. data/dist/chunks/lib-BGzBzFZX.js +29 -0
  27. data/dist/chunks/{pb_form_validation-DMajaRt3.js → pb_form_validation-BvNy9Bd6.js} +1 -1
  28. data/dist/chunks/vendor.js +1 -1
  29. data/dist/playbook-doc.js +1 -1
  30. data/dist/playbook-rails-react-bindings.js +1 -1
  31. data/dist/playbook-rails.js +1 -1
  32. data/dist/playbook.css +1 -1
  33. data/lib/playbook/version.rb +1 -1
  34. metadata +6 -7
  35. data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +0 -282
  36. data/dist/chunks/_weekday_stacked-jxFuYoYX.js +0 -45
  37. data/dist/chunks/lib-Co5y3V4K.js +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21528e851e7da1a68fbae7253282c62bf76693e9c5a5510267d2be87179c991d
4
- data.tar.gz: ff54496d1d1dc98d3d68e91c16ee01b650cb128ab11e6254be691306d9e79c64
3
+ metadata.gz: 5a8fbad59b6bcf213da8999442155913c3562e141c07d59a2b726122fb3b7644
4
+ data.tar.gz: cb01f14fa0d0b7bbfa98f7c8ebacea874e45e1dc307008bf523ae3a3b29976a4
5
5
  SHA512:
6
- metadata.gz: a43e42dcd18832ecf7369284202e62cd028ff1250c6bb909798f63bac85b0ba40c8fb04f0c5d506dde27365b878be8876642d4faf15a5f09d506b13f499e4ae6
7
- data.tar.gz: 92f158efe372f0b0da3c30a8d3c110dd510a6de7d55865577cf3534e661c7f0af2d48be0a492a7984f00158091017d7598dbfeeeca7a5da1bf48bff3ab68c6b7
6
+ metadata.gz: d6c879326332cde7cb15cc39915c01b998ba6ed799d088baa3222d7d66d0e87d63c85924203473cd35527e97a16139b62e1029be7b6b3f3e0b4c4399e97ac6d6
7
+ data.tar.gz: c9a5f2bdfa46a82adce264fbcf347562a8387d0c88a74174e502ec1f02826f3ca4f57ce0f3f78828b627bb2e8cbd5b7b926217ef65e41745790feb8e571bb1be
@@ -4,3 +4,14 @@ export type ExpandedStateObject = Extract<
4
4
  ExpandedState,
5
5
  Record<string, boolean>
6
6
  >
7
+
8
+ declare global {
9
+ interface Document {
10
+ webkitExitFullscreen?: () => Promise<void>
11
+ msExitFullscreen?: () => Promise<void>
12
+ webkitRequestFullscreen?: () => Promise<void>
13
+ msRequestFullscreen?: () => Promise<void>
14
+ webkitFullscreenElement?: Element | null
15
+ msFullscreenElement?: Element | null
16
+ }
17
+ }
@@ -232,10 +232,6 @@
232
232
  }
233
233
 
234
234
  // Fullscreen
235
- &.advanced-table-fullscreenable {
236
- transition: all 0.3s ease;
237
- }
238
-
239
235
  &.advanced-table-fullscreen {
240
236
  background-color: $border_light;
241
237
  box-sizing: border-box;
@@ -58,9 +58,8 @@ type AdvancedTableProps = {
58
58
  toggleExpansionIcon?: string | string[]
59
59
  onRowSelectionChange?: (arg: RowSelectionState) => void
60
60
  virtualizedRows?: boolean
61
- fullscreenable?: boolean
62
- onFullscreenChange?: (isFullscreen: boolean) => void
63
- getFullscreenControls?: (controls: FullscreenControls) => void
61
+ allowFullScreen?: boolean
62
+ fullScreenControl?: (controls: FullscreenControls) => void
64
63
  } & GlobalProps;
65
64
 
66
65
  const AdvancedTable = (props: AdvancedTableProps) => {
@@ -94,9 +93,8 @@ const AdvancedTable = (props: AdvancedTableProps) => {
94
93
  toggleExpansionIcon = "arrows-from-line",
95
94
  onRowSelectionChange,
96
95
  virtualizedRows = false,
97
- fullscreenable = false,
98
- onFullscreenChange,
99
- getFullscreenControls,
96
+ allowFullScreen = false,
97
+ fullScreenControl,
100
98
  } = props;
101
99
 
102
100
  // Component refs
@@ -164,21 +162,76 @@ const AdvancedTable = (props: AdvancedTableProps) => {
164
162
  // Fullscreen
165
163
  const [isFullscreen, setIsFullscreen] = useState(false)
166
164
 
165
+ const enterFullscreen = useCallback(async () => {
166
+ const element = tableWrapperRef.current
167
+ if (!element) return
168
+
169
+ try {
170
+ if (element.requestFullscreen) {
171
+ await element.requestFullscreen()
172
+ } else if ((element as any).webkitRequestFullscreen) {
173
+ await (element as any).webkitRequestFullscreen()
174
+ } else if ((element as any).msRequestFullscreen) {
175
+ await (element as any).msRequestFullscreen()
176
+ }
177
+ } catch (error) {
178
+ console.error('Error attempting to enable fullscreen:', error)
179
+ }
180
+ }, [])
181
+
182
+ const exitFullscreen = useCallback(async () => {
183
+ try {
184
+ if (document.exitFullscreen) {
185
+ await document.exitFullscreen()
186
+ } else if ((document as any).webkitExitFullscreen) {
187
+ await (document as any).webkitExitFullscreen()
188
+ } else if ((document as any).msExitFullscreen) {
189
+ await (document as any).msExitFullscreen()
190
+ }
191
+ } catch (error) {
192
+ console.error('Error exiting fullscreen:', error)
193
+ }
194
+ }, [])
195
+
167
196
  const toggleFullscreen = useCallback(() => {
168
- const newFullscreenState = !isFullscreen
169
- setIsFullscreen(newFullscreenState)
170
-
171
- onFullscreenChange?.(newFullscreenState)
172
- }, [isFullscreen, onFullscreenChange])
197
+ if (isFullscreen) {
198
+ exitFullscreen()
199
+ } else {
200
+ enterFullscreen()
201
+ }
202
+ }, [isFullscreen, enterFullscreen, exitFullscreen])
203
+
204
+ const handleFullscreenChange = useCallback(() => {
205
+ const isCurrentlyFullscreen = !!(
206
+ document.fullscreenElement ||
207
+ (document as any).webkitFullscreenElement ||
208
+ (document as any).msFullscreenElement
209
+ )
210
+ setIsFullscreen(isCurrentlyFullscreen)
211
+ }, [])
173
212
 
174
213
  useEffect(() => {
175
- if (fullscreenable && getFullscreenControls) {
176
- getFullscreenControls({
177
- toggleFullscreen,
178
- isFullscreen
214
+ if (!allowFullScreen) return
215
+
216
+ document.addEventListener('fullscreenchange', handleFullscreenChange)
217
+ document.addEventListener('webkitfullscreenchange', handleFullscreenChange)
218
+ document.addEventListener('msfullscreenchange', handleFullscreenChange)
219
+
220
+ return () => {
221
+ document.removeEventListener('fullscreenchange', handleFullscreenChange)
222
+ document.removeEventListener('webkitfullscreenchange', handleFullscreenChange)
223
+ document.removeEventListener('msfullscreenchange', handleFullscreenChange)
224
+ }
225
+ }, [allowFullScreen, handleFullscreenChange])
226
+
227
+ useEffect(() => {
228
+ if (fullScreenControl && allowFullScreen) {
229
+ fullScreenControl({
230
+ toggleFullscreen,
231
+ isFullscreen
179
232
  })
180
233
  }
181
- }, [fullscreenable, getFullscreenControls, toggleFullscreen, isFullscreen])
234
+ }, [allowFullScreen, fullScreenControl, toggleFullscreen, isFullscreen])
182
235
 
183
236
  const renderFullscreenHeader = () => {
184
237
  if (!isFullscreen) return null
@@ -203,7 +256,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
203
256
  borderRadius="none"
204
257
  className="advanced-table-fullscreen-header"
205
258
  {...props}
206
- >
259
+ >
207
260
  <Flex justify="end">
208
261
  {defaultMinimizeIcon}
209
262
  </Flex>
@@ -211,20 +264,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
211
264
  )
212
265
  }
213
266
 
214
- useEffect(() => {
215
- if (!fullscreenable) return
216
-
217
- const handleKeyDown = (event: KeyboardEvent) => {
218
- if (event.key === 'Escape' && isFullscreen) {
219
- event.preventDefault()
220
- toggleFullscreen()
221
- }
222
- }
223
- document.addEventListener('keydown', handleKeyDown)
224
- return () => {
225
- document.removeEventListener('keydown', handleKeyDown)
226
- }
227
- }, [fullscreenable, toggleFullscreen])
228
267
 
229
268
  // Build CSS classes and props
230
269
  const ariaProps = buildAriaProps(aria);
@@ -236,7 +275,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
236
275
  maxHeight ? `advanced-table-max-height-${maxHeight}` : '',
237
276
  {
238
277
  'advanced-table-fullscreen': isFullscreen,
239
- 'advanced-table-fullscreenable': fullscreenable
278
+ 'advanced-table-allow-fullscreen': allowFullScreen
240
279
  },
241
280
  globalProps(props),
242
281
  className
@@ -332,7 +371,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
332
371
  </AdvancedTableProvider>
333
372
 
334
373
  </div>
335
- {/* Bottom Pagination */}
374
+ {/* Bottom Pagination */}
336
375
  {pagination && (
337
376
  <TablePagination
338
377
  onChange={onPageChange}
@@ -149,7 +149,7 @@ return (
149
149
  data={{testid: testId}}
150
150
  sortControl={sortControl}
151
151
  tableData={MOCK_DATA}
152
- >
152
+ >
153
153
  <AdvancedTable.Header enableSorting />
154
154
  <AdvancedTable.Body />
155
155
  </AdvancedTable>
@@ -500,15 +500,15 @@ test("customRenderer prop functions as expected", () => {
500
500
  expect(pill).toBeInTheDocument()
501
501
  })
502
502
 
503
- test("fullscreenable prop adds fullscreen class", () => {
503
+ test("allowFullScreen prop adds fullscreen class", () => {
504
504
  render(
505
505
  <AdvancedTable
506
+ allowFullScreen
506
507
  columnDefinitions={columnDefinitions}
507
- fullscreenable
508
508
  tableData={MOCK_DATA}
509
509
  />
510
510
  )
511
511
 
512
512
  const tableContainer = screen.getByRole("table").closest("div")
513
- expect(tableContainer).toHaveClass("advanced-table-fullscreenable")
513
+ expect(tableContainer).toHaveClass("advanced-table-allow-fullscreen")
514
514
  })
@@ -54,9 +54,9 @@ const AdvancedTableFullscreen = (props) => {
54
54
  />
55
55
  </Flex>
56
56
  <AdvancedTable
57
+ allowFullScreen
57
58
  columnDefinitions={columnDefinitions}
58
- fullscreenable
59
- getFullscreenControls={({ toggleFullscreen }) => setFullscreenToggleSmall(() => toggleFullscreen)}
59
+ fullScreenControl={({ toggleFullscreen }) => setFullscreenToggleSmall(() => toggleFullscreen)}
60
60
  tableData={MOCK_DATA}
61
61
  {...props}
62
62
  >
@@ -72,9 +72,9 @@ const AdvancedTableFullscreen = (props) => {
72
72
  />
73
73
  </Flex>
74
74
  <AdvancedTable
75
+ allowFullScreen
75
76
  columnDefinitions={columnDefinitions}
76
- fullscreenable
77
- getFullscreenControls={({ toggleFullscreen }) => setFullscreenToggleLarge(() => toggleFullscreen)}
77
+ fullScreenControl={({ toggleFullscreen }) => setFullscreenToggleLarge(() => toggleFullscreen)}
78
78
  responsive="none"
79
79
  tableData={PAGINATION_MOCK_DATA}
80
80
  tableProps={tableProps}
@@ -1,3 +1,3 @@
1
- Trigger Fullscreen mode with the `fullscreenable`and `getFullscreenControls` props. `fullscreenable` is a boolean that enables Fullscreen functionality for an Advanced Table. `getFullscreenControls` is a callback function that receives an object containing the table's internal `toggleFullscreen` function, allowing you to store and trigger Fullscreen from the parent component. An external trigger (like a button) must be used to activate Fullscreen mode.
1
+ Trigger Fullscreen mode with the `allowFullScreen`and `fullScreenControl` props. `allowFullScreen` is a boolean that enables Fullscreen functionality for an Advanced Table. `fullScreenControl` is a callback function that receives an object containing the table's internal `toggleFullscreen` function, allowing you to store and trigger Fullscreen from the parent component. An external trigger (like a button) must be used to activate Fullscreen mode.
2
2
 
3
3
  Exit Fullscreen mode by clicking the minimize top-right-corner icon or by pressing the "Escape" keyboard key.
@@ -106,41 +106,41 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
106
106
  const inputAriaProps = buildAriaProps(inputAria)
107
107
  const inputDataProps = buildDataProps(inputData)
108
108
 
109
- useEffect(() => {
110
- datePickerHelper({
111
- allowInput,
112
- customQuickPickDates,
113
- defaultDate,
114
- disableDate,
115
- disableRange,
116
- disableWeekdays,
117
- enableTime,
118
- format,
119
- hideIcon,
120
- inLine,
121
- maxDate,
122
- minDate,
123
- mode,
124
- onChange,
125
- onClose,
126
- pickerId,
127
- plugins,
128
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
129
- // @ts-ignore
130
- position,
131
- positionElement,
132
- selectionType,
133
- showTimezone,
134
- staticPosition,
135
- thisRangesEndToday,
136
- yearRange,
137
- required: false,
138
- }, scrollContainer)
139
- }, initializeOnce ? [] : undefined)
109
+ useEffect(() => {
110
+ datePickerHelper({
111
+ allowInput,
112
+ customQuickPickDates,
113
+ defaultDate,
114
+ disableDate,
115
+ disableRange,
116
+ disableWeekdays,
117
+ enableTime,
118
+ format,
119
+ hideIcon,
120
+ inLine,
121
+ maxDate,
122
+ minDate,
123
+ mode,
124
+ onChange,
125
+ onClose,
126
+ pickerId,
127
+ plugins,
128
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
129
+ // @ts-ignore
130
+ position,
131
+ positionElement,
132
+ selectionType,
133
+ showTimezone,
134
+ staticPosition,
135
+ thisRangesEndToday,
136
+ yearRange,
137
+ required: false,
138
+ }, scrollContainer)
139
+ }, initializeOnce ? [] : undefined)
140
140
  const filteredProps = {...props}
141
141
  if (filteredProps.marginBottom === undefined) {
142
142
  filteredProps.marginBottom = "sm"
143
- }
143
+ }
144
144
  delete filteredProps?.position
145
145
 
146
146
  const classes = classnames(
@@ -221,7 +221,7 @@ useEffect(() => {
221
221
  {hideIcon && inLine ?
222
222
  <div>
223
223
  <div
224
- className={iconWrapperClass()}
224
+ className={`${iconWrapperClass()} date-picker-inline-icon-plus`}
225
225
  id={`${pickerId}-icon-plus`}
226
226
  >
227
227
  <Icon
@@ -230,7 +230,7 @@ useEffect(() => {
230
230
  />
231
231
  </div>
232
232
  <div
233
- className={iconWrapperClass()}
233
+ className={`${iconWrapperClass()} date-picker-inline-angle-down`}
234
234
  id={`${pickerId}-angle-down`}
235
235
  >
236
236
  <Icon
@@ -44,7 +44,7 @@
44
44
  <% if object.hide_icon && object.inline %>
45
45
  <!-- Plus Icon -->
46
46
  <div
47
- class="<%= object.icon_wrapper_class %>"
47
+ class="<%= object.icon_wrapper_class %> date-picker-inline-icon-plus"
48
48
  id="<%= object.picker_id %>-icon-plus"
49
49
  >
50
50
  <%= pb_rails("icon", props: {
@@ -55,7 +55,7 @@
55
55
 
56
56
  <!-- Angle Down Icon -->
57
57
  <div
58
- class="<%= object.icon_wrapper_class %>"
58
+ class="<%= object.icon_wrapper_class %> date-picker-inline-angle-down"
59
59
  id="<%= object.picker_id %>-angle-down"
60
60
  >
61
61
  <%= pb_rails("icon", props: {
@@ -174,6 +174,21 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
174
174
  yearInput.value = fp.currentYear?.toString()
175
175
  }
176
176
 
177
+ const handleDatePickerChange = (fp: Instance, selectedDates: Date[]) => {
178
+ const inputEl = fp.input
179
+
180
+ if (inputEl) {
181
+ const inlineDatePickerElem = inputEl.closest('.inline-date-picker')
182
+ if (inlineDatePickerElem) {
183
+ if (selectedDates && selectedDates.length > 0) {
184
+ inlineDatePickerElem.classList.add('show-angle-down-icon')
185
+ } else {
186
+ inlineDatePickerElem.classList.remove('show-angle-down-icon')
187
+ }
188
+ }
189
+ }
190
+ }
191
+
177
192
  // ===========================================================
178
193
  // | Flatpickr initializer w/ config |
179
194
  // ===========================================================
@@ -204,6 +219,7 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
204
219
  onClose(selectedDates, dateStr)
205
220
  }],
206
221
  onChange: [(selectedDates, dateStr, fp) => {
222
+ handleDatePickerChange(fp, selectedDates)
207
223
  yearChangeHook(fp)
208
224
  onChange(dateStr, selectedDates)
209
225
  }],
@@ -4,14 +4,3 @@
4
4
  inline: true,
5
5
  picker_id: "date-picker-inline"
6
6
  }) %>
7
-
8
- <%= javascript_tag do %>
9
- window.addEventListener("DOMContentLoaded", (event) => {
10
- const fpInline = document.querySelector("#date-picker-inline")._flatpickr
11
- <!-- Display the angle-down icon when a date has been selected -->
12
- const showAngleDownHandler = () => {
13
- document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
14
- }
15
- fpInline.config.onChange.push(showAngleDownHandler)
16
- })
17
- <% end %>
@@ -3,19 +3,12 @@ import React from 'react'
3
3
  import DatePicker from '../_date_picker'
4
4
 
5
5
  const DatePickerInline = (props) => {
6
- const showAngleDownHandler = (dateSelected) => {
7
- if (dateSelected) {
8
- document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
9
- }
10
- }
11
-
12
6
  return (
13
7
  <div>
14
8
  <DatePicker
15
9
  className="inline-date-picker"
16
10
  hideIcon
17
11
  inLine
18
- onChange={showAngleDownHandler}
19
12
  pickerId="date-picker-inline"
20
13
  {...props}
21
14
  />
@@ -14,12 +14,12 @@
14
14
  opacity: 1;
15
15
  }
16
16
  &:not(:hover) {
17
- #date-picker-inline-angle-down {
17
+ .date-picker-inline-angle-down.cal_icon_wrapper {
18
18
  svg {
19
19
  display: none;
20
20
  }
21
21
  }
22
- #date-picker-inline-icon-plus {
22
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
23
23
  svg {
24
24
  color: $slate;
25
25
  display: inline-block;
@@ -33,12 +33,12 @@
33
33
  [class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper .text_input .placeholder {
34
34
  color: $primary;
35
35
  }
36
- #date-picker-inline-angle-down {
36
+ .date-picker-inline-angle-down.cal_icon_wrapper {
37
37
  svg {
38
38
  display: none;
39
39
  }
40
40
  }
41
- #date-picker-inline-icon-plus {
41
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
42
42
  svg {
43
43
  display: inline-block;
44
44
  color: $primary;
@@ -47,32 +47,34 @@
47
47
  }
48
48
  &.show-angle-down-icon {
49
49
  &:not(:hover) {
50
- #date-picker-inline-angle-down {
50
+ .date-picker-inline-angle-down.cal_icon_wrapper {
51
51
  svg {
52
52
  display: inline-block;
53
53
  color: $text_lt_light;
54
54
  }
55
55
  }
56
- #date-picker-inline-icon-plus {
56
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
57
57
  svg {
58
58
  display: none;
59
59
  }
60
60
  }
61
61
  }
62
- #date-picker-inline-icon-plus {
62
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
63
63
  svg {
64
64
  display: none;
65
65
  }
66
66
  }
67
- #date-picker-inline-angle-down {
67
+ .date-picker-inline-angle-down.cal_icon_wrapper {
68
68
  svg {
69
69
  display: inline-block;
70
70
  color: $primary;
71
71
  }
72
72
  }
73
73
  }
74
- #date-picker-inline,
75
- #date-picker-inline .active {
74
+ .date_picker_input.flatpickr-input,
75
+ .date_picker_input.flatpickr-input .active,
76
+ .text_input.flatpickr-input,
77
+ .text_input.flatpickr-input .active {
76
78
  border: none;
77
79
  padding: 5px 5px 5px 10px;
78
80
  background-color: #FFF;
@@ -82,8 +84,8 @@
82
84
  box-shadow: none;
83
85
  }
84
86
  }
85
- #date-picker-inline-angle-down,
86
- #date-picker-inline-icon-plus {
87
+ .date-picker-inline-angle-down.cal_icon_wrapper,
88
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
87
89
  height: 33px;
88
90
  border: none;
89
91
  }
@@ -96,12 +98,12 @@
96
98
  [class^=pb_date_picker_kit].dark {
97
99
  &.inline-date-picker {
98
100
  &:not(:hover) {
99
- #date-picker-inline-angle-down {
101
+ .date-picker-inline-angle-down.cal_icon_wrapper {
100
102
  svg {
101
103
  display: none;
102
104
  }
103
105
  }
104
- #date-picker-inline-icon-plus {
106
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
105
107
  svg {
106
108
  display: inline-block;
107
109
  color: $white;
@@ -115,12 +117,12 @@
115
117
  [class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper .text_input .placeholder {
116
118
  color: $white;
117
119
  }
118
- #date-picker-inline-angle-down {
120
+ .date-picker-inline-angle-down.cal_icon_wrapper {
119
121
  svg {
120
122
  display: none;
121
123
  }
122
124
  }
123
- #date-picker-inline-icon-plus {
125
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
124
126
  svg {
125
127
  display: inline-block;
126
128
  color: $white;
@@ -129,32 +131,34 @@
129
131
  }
130
132
  &.show-angle-down-icon {
131
133
  &:not(:hover) {
132
- #date-picker-inline-angle-down {
134
+ .date-picker-inline-angle-down.cal_icon_wrapper {
133
135
  svg {
134
136
  display: inline-block;
135
137
  color: $white;
136
138
  }
137
139
  }
138
- #date-picker-inline-icon-plus {
140
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
139
141
  svg {
140
142
  display: none;
141
143
  }
142
144
  }
143
145
  }
144
- #date-picker-inline-icon-plus {
146
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
145
147
  svg {
146
148
  display: none;
147
149
  }
148
150
  }
149
- #date-picker-inline-angle-down {
151
+ .date-picker-inline-angle-down.cal_icon_wrapper {
150
152
  svg {
151
153
  display: inline-block;
152
154
  color: $white;
153
155
  }
154
156
  }
155
157
  }
156
- #date-picker-inline,
157
- #date-picker-inline .active {
158
+ .date_picker_input.flatpickr-input,
159
+ .date_picker_input.flatpickr-input .active,
160
+ .text_input.flatpickr-input,
161
+ .text_input.flatpickr-input .active {
158
162
  background-color: rgba($white,.10);
159
163
  border: none;
160
164
  padding: 5px 5px 5px 10px;
@@ -164,8 +168,8 @@
164
168
  box-shadow: none;
165
169
  }
166
170
  }
167
- #date-picker-inline-angle-down,
168
- #date-picker-inline-icon-plus {
171
+ .date-picker-inline-angle-down.cal_icon_wrapper,
172
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
169
173
  height: 33px;
170
174
  border: none;
171
175
  }
@@ -1,6 +1,5 @@
1
1
  import React from 'react'
2
- import { map } from 'lodash'
3
- import { isEmpty, omitBy } from '../../utilities/object'
2
+ import { isEmpty, omitBy, map } from '../../utilities/object'
4
3
 
5
4
  import Body from '../../pb_body/_body'
6
5
  import Caption from '../../pb_caption/_caption'
@@ -46,12 +45,12 @@ const CurrentFilters = ({ dark, filters }: CurrentFiltersProps): React.ReactElem
46
45
  dark={dark}
47
46
  size={4}
48
47
  tag="h4"
49
- text={name}
48
+ text={`${name}`}
50
49
  /> :
51
50
  <div>
52
51
  <Caption
53
52
  dark={dark}
54
- text={name}
53
+ text={`${name}`}
55
54
  />
56
55
  <Title
57
56
  dark={dark}
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { map } from 'lodash'
3
- import { find, partial } from '../../utilities/object'
2
+ import { find, partial, map } from '../../utilities/object'
4
3
 
5
4
  import Button from '../../pb_button/_button'
6
5
  import Icon from '../../pb_icon/_icon'
@@ -27,7 +26,7 @@ const directionIcon = (dir: Direction) => (
27
26
 
28
27
  const renderOptions = (options: SortOptions, value: SortValue[], handleChange: (arg0: SortValue) => void) => (
29
28
  map(options, (label, name) => {
30
- const next = nextValue(value, name)
29
+ const next = nextValue(value, String(name))
31
30
  return (
32
31
  <ListItem key={`option-${next.name}-${next.dir}`}>
33
32
  <Button
@@ -1,5 +1,5 @@
1
1
  import PbEnhancedElement from '../pb_enhanced_element'
2
- import { debounce } from 'lodash'
2
+ import { debounce } from '../utilities/object'
3
3
 
4
4
  // Kit selectors
5
5
  const KIT_SELECTOR = '[class^="pb_"][class*="_kit"]'
@@ -1,4 +1,4 @@
1
- import { debounce } from 'lodash'
1
+ import { debounce } from "../../utilities/object"
2
2
  import { useCallback, useMemo, useState } from 'react'
3
3
 
4
4
  export default function useVisibility(initialState = false) {
@@ -7,11 +7,12 @@ import {
7
7
  buildDataProps,
8
8
  buildHtmlProps,
9
9
  } from "../utilities/props";
10
+ import { cloneDeep } from "../utilities/object";
11
+
10
12
  import Icon from "../pb_icon/_icon";
11
13
  import FormPill from "../pb_form_pill/_form_pill";
12
14
  import Body from "../pb_body/_body";
13
15
  import Caption from "../pb_caption/_caption";
14
- import { cloneDeep } from "lodash";
15
16
  import MultiLevelSelectOptions from "./multi_level_select_options";
16
17
  import MultiLevelSelectContext from "./context";
17
18