playbook_ui 14.16.0.pre.alpha.PBNTR881advancedtablefullscreen6884 → 14.16.0.pre.alpha.PLAY1929bracketlayout6927
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -70
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +1 -87
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -14
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +34 -34
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +16 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +28 -24
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +3 -4
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +2 -3
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.scss +57 -0
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +16 -7
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +190 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_layout/layout.test.js +4 -0
- data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +89 -0
- data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +57 -0
- data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +2 -1
- data/app/pb_kits/playbook/pb_tooltip/index.js +183 -56
- data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
- data/app/pb_kits/playbook/utilities/object.test.js +149 -1
- data/app/pb_kits/playbook/utilities/object.ts +124 -42
- data/dist/chunks/{_typeahead-N-EFroAX.js → _typeahead-Djo6qCne.js} +3 -3
- data/dist/chunks/_weekday_stacked-BGGESD-t.js +45 -0
- data/dist/chunks/lib-BGzBzFZX.js +29 -0
- data/dist/chunks/{pb_form_validation-DMajaRt3.js → pb_form_validation-BvNy9Bd6.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +10 -9
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +0 -90
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +0 -3
- data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +0 -282
- data/dist/chunks/_weekday_stacked-jxFuYoYX.js +0 -45
- data/dist/chunks/lib-Co5y3V4K.js +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16f8bb0105f1cb3ed42b3ced5e3404771f205fd4f7ad0ffe6a369a611adcedb6
|
4
|
+
data.tar.gz: 257b900f5c2e0c6b13e1aea22038f85fccb2a122393bac58a44db05a6ccd3a4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cabc6aa7b699425aad6e5f1a6b21a7c95179b1508febb11bd8c273c69773b22ec7475c2e1a09008016685e6f3448f4afbdb6ac0c7260d50ffb8fb81cba215161
|
7
|
+
data.tar.gz: ce3a688284ae165abdcecdc21437385de43e9bb6518667c87e63ab8ce3a96a3c69b92c220025a6a5b1eb99b55175c1f5d9233ffa272c24158d63e2d3f52b3fc4
|
@@ -7,7 +7,6 @@
|
|
7
7
|
@import "./scss_partials/chrome_styles";
|
8
8
|
@import "../tokens/screen_sizes";
|
9
9
|
@import "../tokens/shadows";
|
10
|
-
@import "../tokens/positioning";
|
11
10
|
|
12
11
|
.pb_advanced_table {
|
13
12
|
$border-color: 1px solid $border_light;
|
@@ -230,53 +229,6 @@
|
|
230
229
|
max-height: 1920px;
|
231
230
|
overflow-y: auto;
|
232
231
|
}
|
233
|
-
|
234
|
-
// Fullscreen
|
235
|
-
&.advanced-table-fullscreenable {
|
236
|
-
transition: all 0.3s ease;
|
237
|
-
}
|
238
|
-
|
239
|
-
&.advanced-table-fullscreen {
|
240
|
-
background-color: $border_light;
|
241
|
-
box-sizing: border-box;
|
242
|
-
height: 100%;
|
243
|
-
left: 0;
|
244
|
-
overflow: auto;
|
245
|
-
position: fixed;
|
246
|
-
top: 0;
|
247
|
-
width: 100%;
|
248
|
-
z-index: $z_10;
|
249
|
-
|
250
|
-
.pb_table {
|
251
|
-
th, td, div, button {
|
252
|
-
font-size: calc(100%);
|
253
|
-
}
|
254
|
-
box-sizing: border-box;
|
255
|
-
margin: $space_lg;
|
256
|
-
max-width: calc(100% - 64px);
|
257
|
-
width: calc(100% - 64px);
|
258
|
-
}
|
259
|
-
|
260
|
-
.pb_table.sticky-header {
|
261
|
-
thead,
|
262
|
-
.pb_advanced_table_header {
|
263
|
-
position: sticky !important;
|
264
|
-
top: 44px !important;
|
265
|
-
z-index: $z_10;
|
266
|
-
}
|
267
|
-
}
|
268
|
-
}
|
269
|
-
|
270
|
-
.advanced-table-fullscreen-header {
|
271
|
-
background-color: $white;
|
272
|
-
height: 44px;
|
273
|
-
padding: 13px 20px;
|
274
|
-
position: sticky;
|
275
|
-
top: 0;
|
276
|
-
width: 100%;
|
277
|
-
z-index: $z_10;
|
278
|
-
}
|
279
|
-
|
280
232
|
// Icons
|
281
233
|
.button-icon {
|
282
234
|
display: flex;
|
@@ -325,16 +277,6 @@
|
|
325
277
|
}
|
326
278
|
}
|
327
279
|
|
328
|
-
.fullscreen-icon {
|
329
|
-
@extend .button-icon;
|
330
|
-
@extend %primary-color-pseudo;
|
331
|
-
padding: 2px 0;
|
332
|
-
|
333
|
-
&:focus-visible {
|
334
|
-
border-radius: $border_rad_lighter;
|
335
|
-
}
|
336
|
-
}
|
337
|
-
|
338
280
|
// Vertical separator
|
339
281
|
.table-header-cells:first-child,
|
340
282
|
.table-header-cells-custom:first-child,
|
@@ -524,18 +466,6 @@
|
|
524
466
|
box-shadow: 1px 0px 0px 0px $border_dark !important;
|
525
467
|
}
|
526
468
|
|
527
|
-
// Fullscreen
|
528
|
-
&.advanced-table-fullscreen {
|
529
|
-
background: $border_dark;
|
530
|
-
}
|
531
|
-
|
532
|
-
.advanced-table-fullscreen-header {
|
533
|
-
background-color: $bg_dark_card;
|
534
|
-
position: sticky;
|
535
|
-
top: 0;
|
536
|
-
z-index: $z_10;
|
537
|
-
}
|
538
|
-
|
539
469
|
// Dark Mode Responsive Styles
|
540
470
|
@media only screen and (max-width: $screen-xl-min) {
|
541
471
|
&[class*="advanced-table-responsive-scroll"] {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useRef, useEffect
|
1
|
+
import React, { useRef, useEffect } from "react";
|
2
2
|
import classnames from "classnames";
|
3
3
|
|
4
4
|
import { GenericObject } from "../types";
|
@@ -19,15 +19,6 @@ import TableActionBar from "./Components/TableActionBar";
|
|
19
19
|
import { useTableState } from "./Hooks/useTableState";
|
20
20
|
import { useTableActions } from "./Hooks/useTableActions";
|
21
21
|
|
22
|
-
import Card from "../pb_card/_card"
|
23
|
-
import Flex from "../pb_flex/_flex"
|
24
|
-
import Icon from "../pb_icon/_icon"
|
25
|
-
|
26
|
-
type FullscreenControls = {
|
27
|
-
toggleFullscreen: () => void;
|
28
|
-
isFullscreen: boolean;
|
29
|
-
};
|
30
|
-
|
31
22
|
type AdvancedTableProps = {
|
32
23
|
aria?: { [key: string]: string }
|
33
24
|
actions?: React.ReactNode[] | React.ReactNode
|
@@ -58,9 +49,6 @@ type AdvancedTableProps = {
|
|
58
49
|
toggleExpansionIcon?: string | string[]
|
59
50
|
onRowSelectionChange?: (arg: RowSelectionState) => void
|
60
51
|
virtualizedRows?: boolean
|
61
|
-
fullscreenable?: boolean
|
62
|
-
onFullscreenChange?: (isFullscreen: boolean) => void
|
63
|
-
getFullscreenControls?: (controls: FullscreenControls) => void
|
64
52
|
} & GlobalProps;
|
65
53
|
|
66
54
|
const AdvancedTable = (props: AdvancedTableProps) => {
|
@@ -94,9 +82,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
94
82
|
toggleExpansionIcon = "arrows-from-line",
|
95
83
|
onRowSelectionChange,
|
96
84
|
virtualizedRows = false,
|
97
|
-
fullscreenable = false,
|
98
|
-
onFullscreenChange,
|
99
|
-
getFullscreenControls,
|
100
85
|
} = props;
|
101
86
|
|
102
87
|
// Component refs
|
@@ -161,71 +146,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
161
146
|
);
|
162
147
|
}, [fetchMoreOnBottomReached, fetchNextPage, isFetching, totalFetched, fullData.length]);
|
163
148
|
|
164
|
-
// Fullscreen
|
165
|
-
const [isFullscreen, setIsFullscreen] = useState(false)
|
166
|
-
|
167
|
-
const toggleFullscreen = useCallback(() => {
|
168
|
-
const newFullscreenState = !isFullscreen
|
169
|
-
setIsFullscreen(newFullscreenState)
|
170
|
-
|
171
|
-
onFullscreenChange?.(newFullscreenState)
|
172
|
-
}, [isFullscreen, onFullscreenChange])
|
173
|
-
|
174
|
-
useEffect(() => {
|
175
|
-
if (fullscreenable && getFullscreenControls) {
|
176
|
-
getFullscreenControls({
|
177
|
-
toggleFullscreen,
|
178
|
-
isFullscreen
|
179
|
-
})
|
180
|
-
}
|
181
|
-
}, [fullscreenable, getFullscreenControls, toggleFullscreen, isFullscreen])
|
182
|
-
|
183
|
-
const renderFullscreenHeader = () => {
|
184
|
-
if (!isFullscreen) return null
|
185
|
-
|
186
|
-
const defaultMinimizeIcon = (
|
187
|
-
<button
|
188
|
-
className="gray-icon fullscreen-icon"
|
189
|
-
onClick={toggleFullscreen}
|
190
|
-
>
|
191
|
-
<Icon
|
192
|
-
cursor="pointer"
|
193
|
-
fixedWidth
|
194
|
-
icon="grid-2"
|
195
|
-
{...props}
|
196
|
-
/>
|
197
|
-
</button>
|
198
|
-
)
|
199
|
-
|
200
|
-
return (
|
201
|
-
<Card
|
202
|
-
borderNone
|
203
|
-
borderRadius="none"
|
204
|
-
className="advanced-table-fullscreen-header"
|
205
|
-
{...props}
|
206
|
-
>
|
207
|
-
<Flex justify="end">
|
208
|
-
{defaultMinimizeIcon}
|
209
|
-
</Flex>
|
210
|
-
</Card>
|
211
|
-
)
|
212
|
-
}
|
213
|
-
|
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
|
-
|
229
149
|
// Build CSS classes and props
|
230
150
|
const ariaProps = buildAriaProps(aria);
|
231
151
|
const dataProps = buildDataProps(data);
|
@@ -234,10 +154,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
234
154
|
buildCss("pb_advanced_table"),
|
235
155
|
`advanced-table-responsive-${responsive}`,
|
236
156
|
maxHeight ? `advanced-table-max-height-${maxHeight}` : '',
|
237
|
-
{
|
238
|
-
'advanced-table-fullscreen': isFullscreen,
|
239
|
-
'advanced-table-fullscreenable': fullscreenable
|
240
|
-
},
|
241
157
|
globalProps(props),
|
242
158
|
className
|
243
159
|
);
|
@@ -278,7 +194,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
278
194
|
ref={tableWrapperRef}
|
279
195
|
style={tableWrapperStyle as React.CSSProperties}
|
280
196
|
>
|
281
|
-
{renderFullscreenHeader()}
|
282
197
|
<AdvancedTableProvider
|
283
198
|
columnDefinitions={columnDefinitions}
|
284
199
|
enableToggleExpansion={enableToggleExpansion}
|
@@ -289,7 +204,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
289
204
|
hasAnySubRows={hasAnySubRows}
|
290
205
|
inlineRowLoading={inlineRowLoading}
|
291
206
|
isActionBarVisible={isActionBarVisible}
|
292
|
-
isFullscreen={isFullscreen}
|
293
207
|
loading={loading}
|
294
208
|
responsive={responsive}
|
295
209
|
selectableRows={selectableRows}
|
@@ -498,17 +498,4 @@ test("customRenderer prop functions as expected", () => {
|
|
498
498
|
const kit = screen.getByTestId(testId)
|
499
499
|
const pill = kit.querySelector(".pb_pill_kit_success_lowercase")
|
500
500
|
expect(pill).toBeInTheDocument()
|
501
|
-
})
|
502
|
-
|
503
|
-
test("fullscreenable prop adds fullscreen class", () => {
|
504
|
-
render(
|
505
|
-
<AdvancedTable
|
506
|
-
columnDefinitions={columnDefinitions}
|
507
|
-
fullscreenable
|
508
|
-
tableData={MOCK_DATA}
|
509
|
-
/>
|
510
|
-
)
|
511
|
-
|
512
|
-
const tableContainer = screen.getByRole("table").closest("div")
|
513
|
-
expect(tableContainer).toHaveClass("advanced-table-fullscreenable")
|
514
|
-
})
|
501
|
+
})
|
@@ -39,5 +39,4 @@ examples:
|
|
39
39
|
- advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
40
40
|
- advanced_table_selectable_rows_actions: Selectable Rows (With Actions)
|
41
41
|
- advanced_table_selectable_rows_header: Selectable Rows (No Actions Bar)
|
42
|
-
- advanced_table_inline_editing: Inline Cell Editing
|
43
|
-
- advanced_table_fullscreen: Fullscreen
|
42
|
+
- advanced_table_inline_editing: Inline Cell Editing
|
@@ -21,5 +21,4 @@ export { default as AdvancedTableSelectableRowsHeader } from './_advanced_table_
|
|
21
21
|
export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
|
22
22
|
export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
|
23
23
|
export { default as AdvancedTableColumnHeadersCustomCell } from './_advanced_table_column_headers_custom_cell.jsx'
|
24
|
-
export { default as AdvancedTableInlineEditing } from './_advanced_table_inline_editing.jsx'
|
25
|
-
export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
|
24
|
+
export { default as AdvancedTableInlineEditing } from './_advanced_table_inline_editing.jsx'
|
@@ -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
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
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
|
-
|
17
|
+
.date-picker-inline-angle-down.cal_icon_wrapper {
|
18
18
|
svg {
|
19
19
|
display: none;
|
20
20
|
}
|
21
21
|
}
|
22
|
-
|
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
|
-
|
36
|
+
.date-picker-inline-angle-down.cal_icon_wrapper {
|
37
37
|
svg {
|
38
38
|
display: none;
|
39
39
|
}
|
40
40
|
}
|
41
|
-
|
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
|
-
|
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
|
-
|
56
|
+
.date-picker-inline-icon-plus.cal_icon_wrapper {
|
57
57
|
svg {
|
58
58
|
display: none;
|
59
59
|
}
|
60
60
|
}
|
61
61
|
}
|
62
|
-
|
62
|
+
.date-picker-inline-icon-plus.cal_icon_wrapper {
|
63
63
|
svg {
|
64
64
|
display: none;
|
65
65
|
}
|
66
66
|
}
|
67
|
-
|
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
|
-
|
75
|
-
|
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
|
-
|
86
|
-
|
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
|
-
|
101
|
+
.date-picker-inline-angle-down.cal_icon_wrapper {
|
100
102
|
svg {
|
101
103
|
display: none;
|
102
104
|
}
|
103
105
|
}
|
104
|
-
|
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
|
-
|
120
|
+
.date-picker-inline-angle-down.cal_icon_wrapper {
|
119
121
|
svg {
|
120
122
|
display: none;
|
121
123
|
}
|
122
124
|
}
|
123
|
-
|
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
|
-
|
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
|
-
|
140
|
+
.date-picker-inline-icon-plus.cal_icon_wrapper {
|
139
141
|
svg {
|
140
142
|
display: none;
|
141
143
|
}
|
142
144
|
}
|
143
145
|
}
|
144
|
-
|
146
|
+
.date-picker-inline-icon-plus.cal_icon_wrapper {
|
145
147
|
svg {
|
146
148
|
display: none;
|
147
149
|
}
|
148
150
|
}
|
149
|
-
|
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
|
-
|
157
|
-
|
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
|
-
|
168
|
-
|
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 '
|
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
|
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
|