playbook_ui 14.4.0.pre.rc.16 → 14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3930
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +23 -4
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.scss +54 -0
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +5 -184
- data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +1 -1
- data/app/pb_kits/playbook/pb_button/_button.tsx +6 -2
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +5 -216
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +1 -1
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +17 -5
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +14 -6
- data/app/pb_kits/playbook/pb_contact/contact.rb +4 -0
- data/app/pb_kits/playbook/pb_contact/contact.test.js +1 -1
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +2 -6
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +2 -7
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +4 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +4 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +6 -3
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_header_styles.scss +6 -2
- data/app/pb_kits/playbook/pb_dialog/_dialog.scss +2 -0
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_drawer/_close_icon.tsx +25 -0
- data/app/pb_kits/playbook/pb_drawer/_drawer.scss +465 -0
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +195 -0
- data/app/pb_kits/playbook/pb_drawer/_drawer_context.tsx +3 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +117 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +43 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +63 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +55 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +113 -0
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +12 -0
- data/app/pb_kits/playbook/pb_drawer/docs/index.js +5 -0
- data/app/pb_kits/playbook/pb_drawer/drawer.html.erb +12 -0
- data/app/pb_kits/playbook/pb_drawer/drawer.rb +8 -0
- data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +77 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +10 -2
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_height.html.erb +5 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.html.erb +5 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +5 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.html.erb +5 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_only.html.erb +5 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_placement.html.erb +5 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb +5 -1
- data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx +3 -64
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +5 -203
- data/app/pb_kits/playbook/pb_gauge/gauge.test.js +1 -1
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +5 -154
- data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +1 -1
- data/app/pb_kits/playbook/pb_map/_map_controls.tsx +7 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +15 -4
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +12 -1
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md +3 -1
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +10 -2
- data/app/pb_kits/playbook/pb_popover/docs/_popover_list.html.erb +14 -13
- data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +4 -4
- data/app/pb_kits/playbook/pb_radio/_radio.tsx +92 -33
- data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.html.erb +2 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +62 -0
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_radio/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +12 -5
- data/app/pb_kits/playbook/pb_select/_select.tsx +5 -2
- data/app/pb_kits/playbook/pb_select/select.html.erb +1 -1
- data/app/pb_kits/playbook/pb_select/select.rb +4 -0
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +0 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +17 -13
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +5 -113
- data/app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +14 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +3 -0
- data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +6 -5
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.html.erb +88 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx +60 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -1
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +6 -1
- data/app/pb_kits/playbook/utilities/icons/allicons.tsx +136 -13
- data/app/pb_kits/playbook/utilities/icons/angle-down.svg +3 -0
- data/app/pb_kits/playbook/utilities/icons/envelope.svg +3 -0
- data/dist/chunks/_typeahead-BywvWGAm.js +22 -0
- data/dist/chunks/_weekday_stacked-5OGZKZeo.js +45 -0
- data/dist/chunks/lib-DMOmCoAX.js +29 -0
- data/dist/chunks/{pb_form_validation-zV9OpdSt.js → pb_form_validation-Dna2I7fw.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +3 -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/pagination_renderer.rb +10 -2
- data/lib/playbook/version.rb +2 -2
- metadata +26 -6
- data/dist/chunks/_typeahead-B2zRxReA.js +0 -22
- data/dist/chunks/_weekday_stacked-Co95UEiW.js +0 -45
- data/dist/chunks/lib-D2U4I1U6.js +0 -16
@@ -79,7 +79,7 @@ test('returns correct icon', () => {
|
|
79
79
|
expect(screen.getByTestId('test-home').querySelector('.pb_icon_kit')).toHaveClass('fa-phone')
|
80
80
|
expect(screen.getByTestId('test-work').querySelector('.pb_icon_kit')).toHaveClass('fa-phone-office')
|
81
81
|
expect(screen.getByTestId('test-work-cell').querySelector('.pb_icon_kit')).toHaveClass('fa-phone-laptop')
|
82
|
-
expect(screen.getByTestId('test-email').querySelector('.
|
82
|
+
expect(screen.getByTestId('test-email').querySelector('.pb_custom_icon')).toHaveClass('envelope')
|
83
83
|
expect(screen.getByTestId('test-wrong-phone').querySelector('.pb_icon_kit')).toHaveClass('fa-phone-slash')
|
84
84
|
expect(screen.getByTestId('test-wrong-type').querySelector('.pb_icon_kit')).toHaveClass('fa-phone')
|
85
85
|
expect(screen.getByTestId('test-extension').querySelector('.pb_icon_kit')).toHaveClass('fa-phone-plus')
|
@@ -3,11 +3,7 @@ import typography from '../tokens/exports/_typography.module.scss'
|
|
3
3
|
|
4
4
|
import { ThemeProps } from './themeTypes'
|
5
5
|
|
6
|
-
|
7
|
-
traverseUpButton?: {
|
8
|
-
position: { y: number };
|
9
|
-
};
|
10
|
-
}
|
6
|
+
import { PlotTreemapOptions } from "highcharts";
|
11
7
|
|
12
8
|
const highchartsDarkTheme: ThemeProps = {
|
13
9
|
lang: {
|
@@ -206,7 +202,7 @@ const highchartsDarkTheme: ThemeProps = {
|
|
206
202
|
traverseUpButton: {
|
207
203
|
position: { y: -50 },
|
208
204
|
},
|
209
|
-
} as
|
205
|
+
} as PlotTreemapOptions,
|
210
206
|
},
|
211
207
|
credits: {
|
212
208
|
enabled: false
|
@@ -3,12 +3,7 @@ import typography from '../tokens/exports/_typography.module.scss'
|
|
3
3
|
|
4
4
|
import { ThemeProps } from './themeTypes'
|
5
5
|
|
6
|
-
|
7
|
-
traverseUpButton?: {
|
8
|
-
position: { y: number };
|
9
|
-
};
|
10
|
-
}
|
11
|
-
|
6
|
+
import { PlotTreemapOptions } from "highcharts";
|
12
7
|
|
13
8
|
const highchartsTheme: ThemeProps = {
|
14
9
|
lang: {
|
@@ -206,7 +201,7 @@ const highchartsTheme: ThemeProps = {
|
|
206
201
|
traverseUpButton: {
|
207
202
|
position: { y: -50 },
|
208
203
|
},
|
209
|
-
} as
|
204
|
+
} as PlotTreemapOptions,
|
210
205
|
},
|
211
206
|
credits: {
|
212
207
|
enabled: false
|
@@ -3,6 +3,7 @@ import classnames from 'classnames'
|
|
3
3
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
5
5
|
import { deprecatedProps, globalProps, GlobalProps } from '../utilities/globalProps'
|
6
|
+
import { getAllIcons } from "../utilities/icons/allicons"
|
6
7
|
|
7
8
|
import datePickerHelper from './date_picker_helper'
|
8
9
|
import Icon from '../pb_icon/_icon'
|
@@ -161,7 +162,7 @@ useEffect(() => {
|
|
161
162
|
}
|
162
163
|
return base
|
163
164
|
}
|
164
|
-
|
165
|
+
const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
|
165
166
|
|
166
167
|
return (
|
167
168
|
<div
|
@@ -231,8 +232,8 @@ useEffect(() => {
|
|
231
232
|
id={`${pickerId}-angle-down`}
|
232
233
|
>
|
233
234
|
<Icon
|
234
|
-
className="angle_down_icon"
|
235
|
-
|
235
|
+
className="angle_down_icon svg-inline--fa"
|
236
|
+
customIcon={angleDown}
|
236
237
|
/>
|
237
238
|
</div>
|
238
239
|
</div>
|
@@ -5,6 +5,9 @@ import monthSelectPlugin from 'flatpickr/dist/plugins/monthSelect'
|
|
5
5
|
import weekSelect from "flatpickr/dist/plugins/weekSelect/weekSelect"
|
6
6
|
import timeSelectPlugin from './plugins/timeSelect'
|
7
7
|
import quickPickPlugin from './plugins/quickPick'
|
8
|
+
import { getAllIcons } from '../utilities/icons/allicons';
|
9
|
+
|
10
|
+
const angleDown = getAllIcons().angleDown.string
|
8
11
|
|
9
12
|
const getPositionElement = (element: string | Element) => {
|
10
13
|
return (typeof element === 'string') ? document.querySelectorAll(element)[0] : element
|
@@ -256,10 +259,10 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
|
|
256
259
|
})
|
257
260
|
}
|
258
261
|
|
259
|
-
// Adding dropdown icons to year and month
|
260
|
-
dropdown.insertAdjacentHTML('afterend',
|
262
|
+
// Adding dropdown icons to year and month select
|
263
|
+
dropdown.insertAdjacentHTML('afterend', `<i class="year-dropdown-icon">${angleDown}</i>`)
|
261
264
|
if (picker.monthElements[0].parentElement) {
|
262
|
-
return picker.monthElements[0].insertAdjacentHTML('afterend',
|
265
|
+
return picker.monthElements[0].insertAdjacentHTML('afterend', `<i class="month-dropdown-icon">${angleDown}</i>`)}
|
263
266
|
// if (picker.weekElements[0].parentElement){
|
264
267
|
// return picker.weekElements[0].insertAdjacentHTML('afterend', '<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>')
|
265
268
|
// }
|
@@ -76,7 +76,11 @@
|
|
76
76
|
pointer-events: none;
|
77
77
|
color: $text_lt_light;
|
78
78
|
}
|
79
|
-
|
79
|
+
.year-dropdown-icon svg, .month-dropdown-icon svg {
|
80
|
+
width: 16px;
|
81
|
+
margin-top: 6px;
|
82
|
+
margin-left: -2px;
|
83
|
+
}
|
80
84
|
// Left - Right Arrow Styling
|
81
85
|
.flatpickr-prev-month {
|
82
86
|
display: flex;
|
@@ -113,4 +117,4 @@
|
|
113
117
|
}
|
114
118
|
}
|
115
119
|
}
|
116
|
-
}
|
120
|
+
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= pb_rails("flex", props: {classname:object.classname, spacing:"between", padding:"sm", align:"center"}) do %>
|
3
3
|
<%= content.presence || object.title %>
|
4
4
|
|
5
|
-
<button class="dialog-button-class" type="button" data-close-dialog= <%= object.id %> >
|
5
|
+
<button class="dialog-button-class pb_dialog_close_icon" type="button" data-close-dialog= <%= object.id %> >
|
6
6
|
<%= pb_rails("icon", props: { custom_icon: Playbook::Engine::root.join(times_icon) }) %>
|
7
7
|
</button>
|
8
8
|
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Icon from '../pb_icon/_icon'
|
3
|
+
|
4
|
+
import { getAllIcons } from "../utilities/icons/allicons"
|
5
|
+
|
6
|
+
type CloseIconProps = {
|
7
|
+
onClose: () => void,
|
8
|
+
}
|
9
|
+
|
10
|
+
export const CloseIcon = (props: CloseIconProps): React.ReactElement => {
|
11
|
+
const { onClose } = props
|
12
|
+
const timesIcon = getAllIcons()["times"]
|
13
|
+
return (
|
14
|
+
<div
|
15
|
+
className="pb_dialog_close_icon"
|
16
|
+
onClick={onClose}
|
17
|
+
>
|
18
|
+
<Icon
|
19
|
+
className="svg-inline--fa"
|
20
|
+
customIcon={timesIcon.icon as unknown as { [key: string]: SVGElement }}
|
21
|
+
fixedWidth
|
22
|
+
/>
|
23
|
+
</div>
|
24
|
+
)
|
25
|
+
}
|
@@ -0,0 +1,465 @@
|
|
1
|
+
@import "../tokens/positioning";
|
2
|
+
@import "../tokens/colors";
|
3
|
+
@import "../pb_card/card_mixin";
|
4
|
+
@import "../tokens/shadows";
|
5
|
+
@import "../tokens/border_radius";
|
6
|
+
@import "../tokens/spacing";
|
7
|
+
@import "../tokens/animation-curves";
|
8
|
+
@import "../tokens/positioning";
|
9
|
+
|
10
|
+
// Drawer animations
|
11
|
+
// Drawer animations for fading in and out from the center
|
12
|
+
@keyframes modalFadeIn {
|
13
|
+
from {
|
14
|
+
transform: translate3d(0, -100%, 0);
|
15
|
+
opacity: 0;
|
16
|
+
}
|
17
|
+
to {
|
18
|
+
transform: translate3d(0, 0, 0);
|
19
|
+
opacity: 1;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
@keyframes modalFadeOut {
|
24
|
+
from {
|
25
|
+
transform: translate3d(0, 0, 0);
|
26
|
+
opacity: 1;
|
27
|
+
}
|
28
|
+
to {
|
29
|
+
transform: translate3d(0, -50%, 0);
|
30
|
+
opacity: 0;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
// Drawer animations for fading in and out from the right side
|
35
|
+
|
36
|
+
@keyframes overlayFade {
|
37
|
+
from {
|
38
|
+
opacity: 0;
|
39
|
+
transform: translateY(0);
|
40
|
+
}
|
41
|
+
to {
|
42
|
+
opacity: 1;
|
43
|
+
transform: translateY(0);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
@keyframes overlayFadeOut {
|
48
|
+
from {
|
49
|
+
opacity: 1;
|
50
|
+
}
|
51
|
+
to {
|
52
|
+
opacity: 0;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
body.ReactModal__Body--open {
|
57
|
+
transition: margin-left 0.3s ease-in-out, margin-right 0.3s ease-in-out;
|
58
|
+
}
|
59
|
+
|
60
|
+
.pb_drawer_lg_left.pb_drawer {
|
61
|
+
transform: translateX(-100%);
|
62
|
+
}
|
63
|
+
|
64
|
+
.pb_drawer_lg_right.pb_drawer {
|
65
|
+
transform: translateX(100%);
|
66
|
+
}
|
67
|
+
|
68
|
+
.pb_drawer.pb_drawer_after_open {
|
69
|
+
transform: translateX(0); /* Slide in */
|
70
|
+
}
|
71
|
+
// Drawer Styles
|
72
|
+
.pb_drawer {
|
73
|
+
|
74
|
+
// Local Variables
|
75
|
+
$gutter: $space_lg;
|
76
|
+
$xsmall: 64px;
|
77
|
+
$small: 200px;
|
78
|
+
$medium: 250px;
|
79
|
+
$large: 300px;
|
80
|
+
$xlarge: 365px;
|
81
|
+
$animation-duration: .2s;
|
82
|
+
$z-index: 100;
|
83
|
+
$opacity_visible: 1;
|
84
|
+
$opacity_hidden: 0;
|
85
|
+
|
86
|
+
.drawer {
|
87
|
+
position: sticky;
|
88
|
+
top: 0;
|
89
|
+
background-color: $white;
|
90
|
+
z-index: $z_8;
|
91
|
+
}
|
92
|
+
|
93
|
+
// @include pb_card;
|
94
|
+
background-color: $white;
|
95
|
+
border: 0;
|
96
|
+
box-shadow: $shadow_deepest; // border class here
|
97
|
+
max-height: calc(100vh - #{$gutter * 2});
|
98
|
+
max-width: calc(100vw - #{$gutter * 2});
|
99
|
+
overflow: auto;
|
100
|
+
animation-name: modalFadeIn;
|
101
|
+
animation-duration: $animation-duration;
|
102
|
+
outline: none;
|
103
|
+
animation-timing-function: $easeInOutQuint;
|
104
|
+
transition: transform 0.3s ease-in-out;
|
105
|
+
|
106
|
+
&.drawer_border_full {
|
107
|
+
box-shadow: none;
|
108
|
+
border: 2px solid #f3f7fb;
|
109
|
+
}
|
110
|
+
|
111
|
+
&.drawer_border_right {
|
112
|
+
border-right: 2px solid #f3f7fb;
|
113
|
+
}
|
114
|
+
|
115
|
+
&.drawer_border_left {
|
116
|
+
border-left: 2px solid #f3f7fb;
|
117
|
+
}
|
118
|
+
|
119
|
+
&[class*="_left"] {
|
120
|
+
animation-name: modalFadeInLeft;
|
121
|
+
&[class*="_before_close"] {
|
122
|
+
animation-name: modalFadeOutLeft;
|
123
|
+
animation-duration: $animation-duration;
|
124
|
+
opacity: $opacity_hidden;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
&[class*="_right"] {
|
129
|
+
animation-name: modalFadeInRight;
|
130
|
+
&[class*="_before_close"] {
|
131
|
+
animation-name: modalFadeOutRight;
|
132
|
+
animation-duration: $animation-duration;
|
133
|
+
opacity: $opacity_hidden;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
&[class*="_xs_"] {
|
138
|
+
width: $xsmall;
|
139
|
+
max-width: $xsmall;
|
140
|
+
}
|
141
|
+
|
142
|
+
&[class*="_sm_"] {
|
143
|
+
width: $small;
|
144
|
+
max-width: $small;
|
145
|
+
}
|
146
|
+
|
147
|
+
&[class*="_md_"] {
|
148
|
+
width: $medium;
|
149
|
+
max-width: $medium;
|
150
|
+
}
|
151
|
+
|
152
|
+
&[class*="_lg_"] {
|
153
|
+
width: $large;
|
154
|
+
max-width: $large;
|
155
|
+
}
|
156
|
+
|
157
|
+
&[class*="_xl_"] {
|
158
|
+
width: $xlarge;
|
159
|
+
max-width: $xlarge;
|
160
|
+
}
|
161
|
+
|
162
|
+
&_body_open {
|
163
|
+
overflow: hidden;
|
164
|
+
}
|
165
|
+
|
166
|
+
&_after_open {
|
167
|
+
opacity: $opacity_visible;
|
168
|
+
}
|
169
|
+
|
170
|
+
&.no-background {
|
171
|
+
background-color: transparent;
|
172
|
+
}
|
173
|
+
|
174
|
+
&[class*="_before_close"] {
|
175
|
+
animation-name: modalFadeOut;
|
176
|
+
animation-duration: $animation-duration;
|
177
|
+
opacity: $opacity_hidden;
|
178
|
+
}
|
179
|
+
|
180
|
+
&_close_icon {
|
181
|
+
cursor: pointer;
|
182
|
+
}
|
183
|
+
|
184
|
+
&_overlay {
|
185
|
+
position: fixed;
|
186
|
+
top: 0;
|
187
|
+
left: 0;
|
188
|
+
right: 0;
|
189
|
+
bottom: 0;
|
190
|
+
display: flex;
|
191
|
+
align-items: center;
|
192
|
+
justify-content: center;
|
193
|
+
background-color: rgba($bg_dark, $opacity_4);
|
194
|
+
z-index: $z-index;
|
195
|
+
animation-name: overlayFade;
|
196
|
+
animation-duration: $animation-duration;
|
197
|
+
|
198
|
+
&_after_open {
|
199
|
+
opacity: $opacity_visible;
|
200
|
+
}
|
201
|
+
&_before_close {
|
202
|
+
animation-name: overlayFadeOut;
|
203
|
+
animation-duration: $animation-duration;
|
204
|
+
opacity: $opacity_hidden;
|
205
|
+
}
|
206
|
+
&[class*="full_height"] {
|
207
|
+
&[class*="_left"]{
|
208
|
+
justify-content: flex-start;
|
209
|
+
}
|
210
|
+
|
211
|
+
&[class*="_center"]{
|
212
|
+
justify-content: center;
|
213
|
+
}
|
214
|
+
|
215
|
+
&[class*="_right"]{
|
216
|
+
justify-content: flex-end;
|
217
|
+
}
|
218
|
+
|
219
|
+
.pb_drawer {
|
220
|
+
height: 100%;
|
221
|
+
max-height: 100%;
|
222
|
+
max-width: none;
|
223
|
+
// This empty div only has height when drawer is full height
|
224
|
+
// Fix for drawer body content disappearing behind sticky footer
|
225
|
+
.drawer-pseudo-footer {
|
226
|
+
height: $space_xl * 2;
|
227
|
+
}
|
228
|
+
.drawer_footer {
|
229
|
+
position: fixed;
|
230
|
+
bottom: 0;
|
231
|
+
background-color: $white;
|
232
|
+
max-width: 100%;
|
233
|
+
}
|
234
|
+
&[class*="_xs_"] {
|
235
|
+
width: $xsmall;
|
236
|
+
.dialog_footer {
|
237
|
+
width: $xsmall;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
&[class*="_sm_"] {
|
241
|
+
width: $small;
|
242
|
+
.dialog_footer {
|
243
|
+
width: $small;
|
244
|
+
}
|
245
|
+
}
|
246
|
+
&[class*="_md_"] {
|
247
|
+
width: $medium;
|
248
|
+
.dialog_footer {
|
249
|
+
width: $medium;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
&[class*="_lg_"] {
|
253
|
+
width: $large;
|
254
|
+
.dialog_footer {
|
255
|
+
width: $large;
|
256
|
+
}
|
257
|
+
}
|
258
|
+
&[class*="_xl_"] {
|
259
|
+
width: $xlarge;
|
260
|
+
.dialog_footer {
|
261
|
+
width: $xlarge;
|
262
|
+
}
|
263
|
+
}
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}
|
267
|
+
|
268
|
+
&_no_overlay {
|
269
|
+
position: fixed;
|
270
|
+
top: 0;
|
271
|
+
left: 0;
|
272
|
+
right: 0;
|
273
|
+
bottom: 0;
|
274
|
+
display: flex;
|
275
|
+
align-items: center;
|
276
|
+
justify-content: center;
|
277
|
+
z-index: $z-index;
|
278
|
+
animation-name: overlayFade;
|
279
|
+
animation-duration: $animation-duration;
|
280
|
+
overflow: none; /* Ensure body remains scrollable */
|
281
|
+
pointer-events: none; /* Allow interaction inside the drawer itself */
|
282
|
+
|
283
|
+
body.ReactModal__Body--open {
|
284
|
+
overflow: none; /* Ensure body remains scrollable */
|
285
|
+
pointer-events: none; /* Allow interaction inside the drawer itself */
|
286
|
+
}
|
287
|
+
|
288
|
+
&_after_open {
|
289
|
+
opacity: $opacity_visible;
|
290
|
+
overflow: none; /* Ensure body remains scrollable */
|
291
|
+
pointer-events: none; /* Allow interaction inside the drawer itself */
|
292
|
+
}
|
293
|
+
&_before_close {
|
294
|
+
animation-name: overlayFadeOut;
|
295
|
+
animation-duration: $animation-duration;
|
296
|
+
opacity: $opacity_hidden;
|
297
|
+
}
|
298
|
+
&[class*="full_height"] {
|
299
|
+
&[class*="_left"]{
|
300
|
+
justify-content: flex-start;
|
301
|
+
}
|
302
|
+
|
303
|
+
&[class*="_center"]{
|
304
|
+
justify-content: center;
|
305
|
+
}
|
306
|
+
|
307
|
+
&[class*="_right"]{
|
308
|
+
justify-content: flex-end;
|
309
|
+
}
|
310
|
+
|
311
|
+
.pb_drawer {
|
312
|
+
height: 100%;
|
313
|
+
max-height: 100%;
|
314
|
+
max-width: none;
|
315
|
+
// This empty div only has height when drawer is full height
|
316
|
+
// Fix for drawer body content disappearing behind sticky footer
|
317
|
+
.drawer-pseudo-footer {
|
318
|
+
height: $space_xl * 2;
|
319
|
+
}
|
320
|
+
.drawer_footer {
|
321
|
+
position: fixed;
|
322
|
+
bottom: 0;
|
323
|
+
background-color: $white;
|
324
|
+
max-width: 100%;
|
325
|
+
}
|
326
|
+
&[class*="_xs_"] {
|
327
|
+
width: $xsmall;
|
328
|
+
.dialog_footer {
|
329
|
+
width: $xsmall;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
&[class*="_sm_"] {
|
333
|
+
width: $small;
|
334
|
+
.dialog_footer {
|
335
|
+
width: $small;
|
336
|
+
}
|
337
|
+
}
|
338
|
+
&[class*="_md_"] {
|
339
|
+
width: $medium;
|
340
|
+
.dialog_footer {
|
341
|
+
width: $medium;
|
342
|
+
}
|
343
|
+
}
|
344
|
+
&[class*="_lg_"] {
|
345
|
+
width: $large;
|
346
|
+
.dialog_footer {
|
347
|
+
width: $large;
|
348
|
+
}
|
349
|
+
}
|
350
|
+
&[class*="_xl_"] {
|
351
|
+
width: $xlarge;
|
352
|
+
.dialog_footer {
|
353
|
+
width: $xlarge;
|
354
|
+
}
|
355
|
+
}
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}
|
359
|
+
|
360
|
+
[class*="drawer_body"] {
|
361
|
+
padding: $space_sm;
|
362
|
+
}
|
363
|
+
|
364
|
+
[class*="drawer_header"] {
|
365
|
+
padding: $space_sm;
|
366
|
+
}
|
367
|
+
|
368
|
+
[class*="drawer_footer"] {
|
369
|
+
padding: $space_sm;
|
370
|
+
}
|
371
|
+
|
372
|
+
//styles specific to rails version of kit
|
373
|
+
// rails version has own wrapper because of the way the overlay functions for the HTML drawer used to create this
|
374
|
+
.pb_drawer_wrapper_rails {
|
375
|
+
$medium: 500px;
|
376
|
+
$large: 800px;
|
377
|
+
$xlarge: 1150px;
|
378
|
+
|
379
|
+
&[class*="full_height"] {
|
380
|
+
&[class*="_left"]{
|
381
|
+
.pb_drawer_rails {
|
382
|
+
margin: unset !important;
|
383
|
+
margin-right: auto !important;
|
384
|
+
}
|
385
|
+
}
|
386
|
+
|
387
|
+
&[class*="_center"]{
|
388
|
+
justify-content: center;
|
389
|
+
}
|
390
|
+
|
391
|
+
&[class*="_right"]{
|
392
|
+
.pb_drawer_rails {
|
393
|
+
margin: unset !important;
|
394
|
+
margin-left: auto !important;
|
395
|
+
}
|
396
|
+
}
|
397
|
+
|
398
|
+
.pb_drawer {
|
399
|
+
height: 100% !important;
|
400
|
+
max-height: 100% !important;
|
401
|
+
max-width: 100%;
|
402
|
+
// This empty div only has height when drawer is full height.
|
403
|
+
// Fix for drawer body content disappearing behind sticky footer
|
404
|
+
.drawer-pseudo-footer {
|
405
|
+
height: $space_xl * 2;
|
406
|
+
}
|
407
|
+
.drawer_footer {
|
408
|
+
position:fixed;
|
409
|
+
bottom: 0;
|
410
|
+
background-color: $white;
|
411
|
+
max-width: 100%;
|
412
|
+
}
|
413
|
+
&[class*="_sm"] {
|
414
|
+
width: $medium;
|
415
|
+
.drawer_footer {
|
416
|
+
width: $medium;
|
417
|
+
}
|
418
|
+
}
|
419
|
+
&[class*="_md"] {
|
420
|
+
width: $large;
|
421
|
+
.drawer_footer {
|
422
|
+
width: $large;
|
423
|
+
}
|
424
|
+
}
|
425
|
+
&[class*="_lg"] {
|
426
|
+
width: $xlarge;
|
427
|
+
.drawer_footer {
|
428
|
+
width: $xlarge;
|
429
|
+
}
|
430
|
+
}
|
431
|
+
}
|
432
|
+
}
|
433
|
+
|
434
|
+
// Fixes for stylesheets in nitro that were conflicting with our kit. DO NOT REMOVE.
|
435
|
+
// Conflicts were only apparent in nitro, not in playbook local env
|
436
|
+
.pb_drawer_rails {
|
437
|
+
position: fixed !important;
|
438
|
+
top: 0 !important;
|
439
|
+
padding: unset !important;
|
440
|
+
margin: auto;
|
441
|
+
|
442
|
+
}
|
443
|
+
|
444
|
+
// Overlay for rails kit
|
445
|
+
drawer::backdrop {
|
446
|
+
position: fixed;
|
447
|
+
top: 0;
|
448
|
+
left: 0;
|
449
|
+
right: 0;
|
450
|
+
bottom: 0;
|
451
|
+
display: flex;
|
452
|
+
align-items: center;
|
453
|
+
justify-content: center;
|
454
|
+
background-color: rgba($bg_dark, $opacity_4);
|
455
|
+
animation-name: overlayFade;
|
456
|
+
animation-duration: 0.2s;
|
457
|
+
}
|
458
|
+
|
459
|
+
.drawer-button-class {
|
460
|
+
background-color: unset;
|
461
|
+
border: none;
|
462
|
+
cursor: pointer;
|
463
|
+
}
|
464
|
+
}
|
465
|
+
}
|