playbook_ui 14.16.0.pre.alpha.play1958formgrouperrorborder6922 → 14.16.0.pre.alpha.play1959tablekitstripedlogicoverridesbackground6892
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_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 +0 -16
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +11 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +7 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +24 -28
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +4 -3
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +3 -2
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +0 -5
- 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 +1 -2
- data/app/pb_kits/playbook/pb_table/styles/_striped.scss +2 -2
- data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +282 -0
- data/app/pb_kits/playbook/pb_tooltip/index.js +56 -183
- 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 +1 -149
- data/app/pb_kits/playbook/utilities/object.ts +42 -124
- data/dist/chunks/{_typeahead-Djo6qCne.js → _typeahead-N-EFroAX.js} +3 -3
- data/dist/chunks/_weekday_stacked-Db780bKR.js +45 -0
- data/dist/chunks/lib-Co5y3V4K.js +29 -0
- data/dist/chunks/{pb_form_validation-BvNy9Bd6.js → pb_form_validation-DMajaRt3.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 +7 -6
- data/dist/chunks/_weekday_stacked-DIIHW0OV.js +0 -45
- data/dist/chunks/lib-BGzBzFZX.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: 587e6ce7fc55be094027d2d2a58d4cf002a8a7c823600bf948296eff7ce928d7
|
4
|
+
data.tar.gz: a53b7609d0f527f00109c9011f9b4c210a48af9597beb28f5e79215631e99353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44da80957b1b634e626e5ccc0e04badbd4211d8d0b65f2d867909970895de8334569832c36a0cd0b61d5514b4a6bd0c5c8afbce702c0beae2161ab798ee371a2
|
7
|
+
data.tar.gz: 937164a8cd121323562f3b2f5b6aa4c63ea6a12c8c04eb67a4b2ad606bf6304772f7a84c44381dfcbb0252ab796c30537e84f5e45f263e2a66333ece35f79e14
|
@@ -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
|
-
|
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
|
-
|
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 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
221
221
|
{hideIcon && inLine ?
|
222
222
|
<div>
|
223
223
|
<div
|
224
|
-
className={
|
224
|
+
className={iconWrapperClass()}
|
225
225
|
id={`${pickerId}-icon-plus`}
|
226
226
|
>
|
227
227
|
<Icon
|
@@ -230,7 +230,7 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
230
230
|
/>
|
231
231
|
</div>
|
232
232
|
<div
|
233
|
-
className={
|
233
|
+
className={iconWrapperClass()}
|
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 %>"
|
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 %>"
|
59
59
|
id="<%= object.picker_id %>-angle-down"
|
60
60
|
>
|
61
61
|
<%= pb_rails("icon", props: {
|
@@ -174,21 +174,6 @@ 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
|
-
|
192
177
|
// ===========================================================
|
193
178
|
// | Flatpickr initializer w/ config |
|
194
179
|
// ===========================================================
|
@@ -219,7 +204,6 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
|
|
219
204
|
onClose(selectedDates, dateStr)
|
220
205
|
}],
|
221
206
|
onChange: [(selectedDates, dateStr, fp) => {
|
222
|
-
handleDatePickerChange(fp, selectedDates)
|
223
207
|
yearChangeHook(fp)
|
224
208
|
onChange(dateStr, selectedDates)
|
225
209
|
}],
|
@@ -4,3 +4,14 @@
|
|
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,12 +3,19 @@ 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
|
+
|
6
12
|
return (
|
7
13
|
<div>
|
8
14
|
<DatePicker
|
9
15
|
className="inline-date-picker"
|
10
16
|
hideIcon
|
11
17
|
inLine
|
18
|
+
onChange={showAngleDownHandler}
|
12
19
|
pickerId="date-picker-inline"
|
13
20
|
{...props}
|
14
21
|
/>
|
@@ -14,12 +14,12 @@
|
|
14
14
|
opacity: 1;
|
15
15
|
}
|
16
16
|
&:not(:hover) {
|
17
|
-
|
17
|
+
#date-picker-inline-angle-down {
|
18
18
|
svg {
|
19
19
|
display: none;
|
20
20
|
}
|
21
21
|
}
|
22
|
-
|
22
|
+
#date-picker-inline-icon-plus {
|
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 {
|
37
37
|
svg {
|
38
38
|
display: none;
|
39
39
|
}
|
40
40
|
}
|
41
|
-
|
41
|
+
#date-picker-inline-icon-plus {
|
42
42
|
svg {
|
43
43
|
display: inline-block;
|
44
44
|
color: $primary;
|
@@ -47,34 +47,32 @@
|
|
47
47
|
}
|
48
48
|
&.show-angle-down-icon {
|
49
49
|
&:not(:hover) {
|
50
|
-
|
50
|
+
#date-picker-inline-angle-down {
|
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 {
|
57
57
|
svg {
|
58
58
|
display: none;
|
59
59
|
}
|
60
60
|
}
|
61
61
|
}
|
62
|
-
|
62
|
+
#date-picker-inline-icon-plus {
|
63
63
|
svg {
|
64
64
|
display: none;
|
65
65
|
}
|
66
66
|
}
|
67
|
-
|
67
|
+
#date-picker-inline-angle-down {
|
68
68
|
svg {
|
69
69
|
display: inline-block;
|
70
70
|
color: $primary;
|
71
71
|
}
|
72
72
|
}
|
73
73
|
}
|
74
|
-
|
75
|
-
|
76
|
-
.text_input.flatpickr-input,
|
77
|
-
.text_input.flatpickr-input .active {
|
74
|
+
#date-picker-inline,
|
75
|
+
#date-picker-inline .active {
|
78
76
|
border: none;
|
79
77
|
padding: 5px 5px 5px 10px;
|
80
78
|
background-color: #FFF;
|
@@ -84,8 +82,8 @@
|
|
84
82
|
box-shadow: none;
|
85
83
|
}
|
86
84
|
}
|
87
|
-
|
88
|
-
|
85
|
+
#date-picker-inline-angle-down,
|
86
|
+
#date-picker-inline-icon-plus {
|
89
87
|
height: 33px;
|
90
88
|
border: none;
|
91
89
|
}
|
@@ -98,12 +96,12 @@
|
|
98
96
|
[class^=pb_date_picker_kit].dark {
|
99
97
|
&.inline-date-picker {
|
100
98
|
&:not(:hover) {
|
101
|
-
|
99
|
+
#date-picker-inline-angle-down {
|
102
100
|
svg {
|
103
101
|
display: none;
|
104
102
|
}
|
105
103
|
}
|
106
|
-
|
104
|
+
#date-picker-inline-icon-plus {
|
107
105
|
svg {
|
108
106
|
display: inline-block;
|
109
107
|
color: $white;
|
@@ -117,12 +115,12 @@
|
|
117
115
|
[class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper .text_input .placeholder {
|
118
116
|
color: $white;
|
119
117
|
}
|
120
|
-
|
118
|
+
#date-picker-inline-angle-down {
|
121
119
|
svg {
|
122
120
|
display: none;
|
123
121
|
}
|
124
122
|
}
|
125
|
-
|
123
|
+
#date-picker-inline-icon-plus {
|
126
124
|
svg {
|
127
125
|
display: inline-block;
|
128
126
|
color: $white;
|
@@ -131,34 +129,32 @@
|
|
131
129
|
}
|
132
130
|
&.show-angle-down-icon {
|
133
131
|
&:not(:hover) {
|
134
|
-
|
132
|
+
#date-picker-inline-angle-down {
|
135
133
|
svg {
|
136
134
|
display: inline-block;
|
137
135
|
color: $white;
|
138
136
|
}
|
139
137
|
}
|
140
|
-
|
138
|
+
#date-picker-inline-icon-plus {
|
141
139
|
svg {
|
142
140
|
display: none;
|
143
141
|
}
|
144
142
|
}
|
145
143
|
}
|
146
|
-
|
144
|
+
#date-picker-inline-icon-plus {
|
147
145
|
svg {
|
148
146
|
display: none;
|
149
147
|
}
|
150
148
|
}
|
151
|
-
|
149
|
+
#date-picker-inline-angle-down {
|
152
150
|
svg {
|
153
151
|
display: inline-block;
|
154
152
|
color: $white;
|
155
153
|
}
|
156
154
|
}
|
157
155
|
}
|
158
|
-
|
159
|
-
|
160
|
-
.text_input.flatpickr-input,
|
161
|
-
.text_input.flatpickr-input .active {
|
156
|
+
#date-picker-inline,
|
157
|
+
#date-picker-inline .active {
|
162
158
|
background-color: rgba($white,.10);
|
163
159
|
border: none;
|
164
160
|
padding: 5px 5px 5px 10px;
|
@@ -168,8 +164,8 @@
|
|
168
164
|
box-shadow: none;
|
169
165
|
}
|
170
166
|
}
|
171
|
-
|
172
|
-
|
167
|
+
#date-picker-inline-angle-down,
|
168
|
+
#date-picker-inline-icon-plus {
|
173
169
|
height: 33px;
|
174
170
|
border: none;
|
175
171
|
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import {
|
2
|
+
import { map } from 'lodash'
|
3
|
+
import { isEmpty, omitBy } from '../../utilities/object'
|
3
4
|
|
4
5
|
import Body from '../../pb_body/_body'
|
5
6
|
import Caption from '../../pb_caption/_caption'
|
@@ -45,12 +46,12 @@ const CurrentFilters = ({ dark, filters }: CurrentFiltersProps): React.ReactElem
|
|
45
46
|
dark={dark}
|
46
47
|
size={4}
|
47
48
|
tag="h4"
|
48
|
-
text={
|
49
|
+
text={name}
|
49
50
|
/> :
|
50
51
|
<div>
|
51
52
|
<Caption
|
52
53
|
dark={dark}
|
53
|
-
text={
|
54
|
+
text={name}
|
54
55
|
/>
|
55
56
|
<Title
|
56
57
|
dark={dark}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
|
-
import {
|
2
|
+
import { map } from 'lodash'
|
3
|
+
import { find, partial } from '../../utilities/object'
|
3
4
|
|
4
5
|
import Button from '../../pb_button/_button'
|
5
6
|
import Icon from '../../pb_icon/_icon'
|
@@ -26,7 +27,7 @@ const directionIcon = (dir: Direction) => (
|
|
26
27
|
|
27
28
|
const renderOptions = (options: SortOptions, value: SortValue[], handleChange: (arg0: SortValue) => void) => (
|
28
29
|
map(options, (label, name) => {
|
29
|
-
const next = nextValue(value,
|
30
|
+
const next = nextValue(value, name)
|
30
31
|
return (
|
31
32
|
<ListItem key={`option-${next.name}-${next.dir}`}>
|
32
33
|
<Button
|
@@ -7,12 +7,11 @@ import {
|
|
7
7
|
buildDataProps,
|
8
8
|
buildHtmlProps,
|
9
9
|
} from "../utilities/props";
|
10
|
-
import { cloneDeep } from "../utilities/object";
|
11
|
-
|
12
10
|
import Icon from "../pb_icon/_icon";
|
13
11
|
import FormPill from "../pb_form_pill/_form_pill";
|
14
12
|
import Body from "../pb_body/_body";
|
15
13
|
import Caption from "../pb_caption/_caption";
|
14
|
+
import { cloneDeep } from "lodash";
|
16
15
|
import MultiLevelSelectOptions from "./multi_level_select_options";
|
17
16
|
import MultiLevelSelectContext from "./context";
|
18
17
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
[class^=pb_table] {
|
2
2
|
&.striped {
|
3
3
|
tbody, .pb_table_tbody {
|
4
|
-
tr:nth-child(odd), .pb_table_tr:nth-child(odd) {
|
4
|
+
tr:nth-child(odd):not(.pb_background_kit), .pb_table_tr:nth-child(odd):not(.pb_background_kit) {
|
5
5
|
background-color: $bg_light;
|
6
6
|
}
|
7
7
|
}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
&.dark {
|
11
11
|
&.striped {
|
12
12
|
tbody, .pb_table_tbody {
|
13
|
-
tr:nth-child(odd), .pb_table_tr:nth-child(odd) {
|
13
|
+
tr:nth-child(odd):not(.pb_background_kit), .pb_table_tr:nth-child(odd):not(.pb_background_kit) {
|
14
14
|
background-color: $bg_dark;
|
15
15
|
}
|
16
16
|
}
|