playbook_ui 10.26.0.pre.alpha.sticky1 → 10.27.0.pre.datepicker1
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 +1 -0
- data/app/pb_kits/playbook/data/menu.yml +1 -0
- data/app/pb_kits/playbook/index.js +2 -1
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +3 -3
- data/app/pb_kits/playbook/pb_background/{_background.jsx → _background.tsx} +20 -13
- data/app/pb_kits/playbook/pb_badge/{_badge.jsx → _badge.tsx} +14 -15
- data/app/pb_kits/playbook/pb_badge/docs/_badge_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_badge/docs/_badge_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_badge/docs/_badge_rounded.jsx +1 -1
- data/app/pb_kits/playbook/pb_badge/docs/index.js +3 -3
- data/app/pb_kits/playbook/pb_body/_body.tsx +9 -9
- data/app/pb_kits/playbook/pb_button/{_button.jsx → _button.tsx} +65 -46
- data/app/pb_kits/playbook/pb_button/docs/_button_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_options.jsx +1 -1
- data/app/pb_kits/playbook/pb_caption/{_caption.jsx → _caption.tsx} +7 -8
- data/app/pb_kits/playbook/pb_card/{_card.jsx → _card.tsx} +24 -22
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_border_none.jsx +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_border_radius.jsx +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_light.jsx +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_selected.jsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.jsx +4 -2
- data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +1 -1
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.js +37 -0
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.js +37 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +1 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +16 -7
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.md +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.html.erb +5 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.jsx +18 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.md +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_week_styles.scss +127 -0
- data/app/pb_kits/playbook/pb_flex/{_flex.jsx → _flex.tsx} +5 -5
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +2 -2
- data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon/{_icon.jsx → _icon.tsx} +40 -30
- data/app/pb_kits/playbook/pb_image/_image.tsx +1 -1
- data/app/pb_kits/playbook/pb_pill/{_pill.jsx → _pill.tsx} +6 -8
- data/app/pb_kits/playbook/pb_pill/docs/_pill_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_pill/docs/_pill_variants.jsx +1 -1
- data/app/pb_kits/playbook/pb_title/{_title.jsx → _title.tsx} +10 -12
- data/app/pb_kits/playbook/pb_title/title.test.js +2 -2
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.jsx +79 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_description.md +5 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.html.erb +37 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.jsx +48 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.md +2 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.html.erb +37 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.jsx +47 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.md +3 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.html.erb +79 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.jsx +90 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.md +1 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.html.erb +54 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.jsx +65 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.md +3 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.html.erb +37 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.jsx +48 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.md +3 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/example.yml +15 -0
- data/app/pb_kits/playbook/pb_treemap_chart/docs/index.js +5 -0
- data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.html.erb +1 -0
- data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb +43 -0
- data/app/pb_kits/playbook/pb_user/{_user.jsx → _user.tsx} +20 -24
- data/app/pb_kits/playbook/playbook-doc.js +2 -0
- data/app/pb_kits/playbook/playbook-rails-react-bindings.js +2 -0
- data/app/pb_kits/playbook/plugins/pb_chart.js +34 -0
- data/app/pb_kits/playbook/tokens/_colors.scss +2 -1
- data/app/pb_kits/playbook/tokens/_display.scss +13 -0
- data/app/pb_kits/playbook/tokens/_screen_sizes.scss +36 -0
- data/app/pb_kits/playbook/utilities/_align_content.scss +10 -29
- data/app/pb_kits/playbook/utilities/_align_items.scss +11 -35
- data/app/pb_kits/playbook/utilities/_align_self.scss +10 -29
- data/app/pb_kits/playbook/utilities/_display.scss +26 -2
- data/app/pb_kits/playbook/utilities/_flex.scss +19 -14
- data/app/pb_kits/playbook/utilities/_flex_direction.scss +7 -18
- data/app/pb_kits/playbook/utilities/_flex_grow.scss +5 -8
- data/app/pb_kits/playbook/utilities/_flex_shrink.scss +5 -8
- data/app/pb_kits/playbook/utilities/_flex_wrap.scss +6 -13
- data/app/pb_kits/playbook/utilities/_justify_content.scss +10 -23
- data/app/pb_kits/playbook/utilities/_justify_self.scss +9 -19
- data/app/pb_kits/playbook/utilities/_mixins.scss +26 -0
- data/app/pb_kits/playbook/utilities/_order.scss +17 -55
- data/app/pb_kits/playbook/utilities/globalProps.ts +150 -121
- data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +37 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +36 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +37 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +38 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +64 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +37 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +35 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +35 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +37 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +37 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +37 -0
- data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +35 -0
- data/app/pb_kits/playbook/utilities/test-utils.js +2 -0
- data/app/pb_kits/playbook/utilities/text.ts +22 -0
- data/dist/reset.css +1 -60
- data/lib/playbook/align_content.rb +11 -3
- data/lib/playbook/align_items.rb +10 -2
- data/lib/playbook/align_self.rb +9 -1
- data/lib/playbook/display.rb +19 -7
- data/lib/playbook/flex.rb +9 -1
- data/lib/playbook/flex_direction.rb +10 -2
- data/lib/playbook/flex_grow.rb +9 -1
- data/lib/playbook/flex_shrink.rb +9 -1
- data/lib/playbook/flex_wrap.rb +10 -2
- data/lib/playbook/justify_content.rb +10 -2
- data/lib/playbook/justify_self.rb +9 -1
- data/lib/playbook/order.rb +10 -2
- data/lib/playbook/version.rb +2 -2
- metadata +52 -13
- data/app/pb_kits/playbook/utilities/text.js +0 -15
@@ -35,12 +35,14 @@ const Icon = ({ collapsed }: IconProps) => {
|
|
35
35
|
const CollapsibleMain = ({
|
36
36
|
children,
|
37
37
|
className,
|
38
|
+
cursor = 'pointer',
|
38
39
|
padding = 'md',
|
40
|
+
|
39
41
|
...props
|
40
42
|
}: CollapsibleMainProps) => {
|
41
43
|
const context = useContext(CollapsibleContext)
|
42
44
|
const mainCSS = buildCss('pb_collapsible_main_kit')
|
43
|
-
const mainSpacing = globalProps(props, { padding })
|
45
|
+
const mainSpacing = globalProps(props, { cursor, padding })
|
44
46
|
|
45
47
|
return (
|
46
48
|
<div className={classnames(mainCSS, className, mainSpacing)}>
|
@@ -50,7 +52,7 @@ const CollapsibleMain = ({
|
|
50
52
|
vertical="center"
|
51
53
|
>
|
52
54
|
<FlexItem>{children}</FlexItem>
|
53
|
-
<FlexItem><Icon collapsed={context.collapsed}
|
55
|
+
<FlexItem><Icon collapsed={context.collapsed}/></FlexItem>
|
54
56
|
</Flex>
|
55
57
|
</div>
|
56
58
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
class: object.classname,
|
5
5
|
aria: object.aria) do %>
|
6
6
|
|
7
|
-
<%= pb_rails("flex", props: {vertical: "center", spacing: "between"}) do %>
|
7
|
+
<%= pb_rails("flex", props: {vertical: "center", spacing: "between", cursor: "pointer"}) do %>
|
8
8
|
<%= pb_rails("flex/flex_item") do %>
|
9
9
|
<%= content.presence %>
|
10
10
|
<% end %>
|
@@ -209,6 +209,43 @@ const highchartsDarkTheme = {
|
|
209
209
|
threshold: null,
|
210
210
|
},
|
211
211
|
},
|
212
|
+
|
213
|
+
//TREEMAP CHART STYLES
|
214
|
+
treemap: {
|
215
|
+
layoutAlgorithm: "squarified",
|
216
|
+
allowTraversingTree: false,
|
217
|
+
animationLimit: 1000,
|
218
|
+
colors: [
|
219
|
+
colors.data_1,
|
220
|
+
colors.data_2,
|
221
|
+
colors.data_3,
|
222
|
+
colors.data_4,
|
223
|
+
colors.data_5,
|
224
|
+
colors.data_6,
|
225
|
+
colors.data_7,
|
226
|
+
colors.data_8,
|
227
|
+
],
|
228
|
+
colorByPoint: true,
|
229
|
+
dataLabels: {
|
230
|
+
enabled: true,
|
231
|
+
style: {
|
232
|
+
fontFamily: typography.font_family_base,
|
233
|
+
fontWeight: typography.bold,
|
234
|
+
fontSize: typography.heading_4,
|
235
|
+
},
|
236
|
+
},
|
237
|
+
levels: [
|
238
|
+
{
|
239
|
+
level: 1,
|
240
|
+
dataLabels: {
|
241
|
+
enabled: false,
|
242
|
+
},
|
243
|
+
},
|
244
|
+
],
|
245
|
+
traverseUpButton: {
|
246
|
+
position: { y: -40 },
|
247
|
+
}
|
248
|
+
},
|
212
249
|
},
|
213
250
|
}
|
214
251
|
|
@@ -209,6 +209,43 @@ const highchartsTheme = {
|
|
209
209
|
threshold: null,
|
210
210
|
},
|
211
211
|
},
|
212
|
+
|
213
|
+
//TREEMAP CHART STYLES
|
214
|
+
treemap: {
|
215
|
+
layoutAlgorithm: "squarified",
|
216
|
+
allowTraversingTree: false,
|
217
|
+
animationLimit: 1000,
|
218
|
+
colors: [
|
219
|
+
colors.data_1,
|
220
|
+
colors.data_2,
|
221
|
+
colors.data_3,
|
222
|
+
colors.data_4,
|
223
|
+
colors.data_5,
|
224
|
+
colors.data_6,
|
225
|
+
colors.data_7,
|
226
|
+
colors.data_8,
|
227
|
+
],
|
228
|
+
colorByPoint: true,
|
229
|
+
dataLabels: {
|
230
|
+
enabled: true,
|
231
|
+
style: {
|
232
|
+
fontFamily: typography.font_family_base,
|
233
|
+
fontWeight: typography.bold,
|
234
|
+
fontSize: typography.heading_4,
|
235
|
+
},
|
236
|
+
},
|
237
|
+
levels: [
|
238
|
+
{
|
239
|
+
level: 1,
|
240
|
+
dataLabels: {
|
241
|
+
enabled: false,
|
242
|
+
},
|
243
|
+
},
|
244
|
+
],
|
245
|
+
traverseUpButton: {
|
246
|
+
position: { y: -40 },
|
247
|
+
}
|
248
|
+
},
|
212
249
|
},
|
213
250
|
}
|
214
251
|
|
@@ -40,7 +40,7 @@ type DatePickerProps = {
|
|
40
40
|
onChange: (String) => void,
|
41
41
|
pickerId?: String,
|
42
42
|
placeholder?: String,
|
43
|
-
plugins?:
|
43
|
+
plugins?: "ms" | "ws",
|
44
44
|
type?: String,
|
45
45
|
yearRange?: Array,
|
46
46
|
}
|
@@ -74,7 +74,7 @@ const DatePicker = (props: DatePickerProps) => {
|
|
74
74
|
onChange = () => {},
|
75
75
|
pickerId,
|
76
76
|
placeholder = 'Select Date',
|
77
|
-
plugins =
|
77
|
+
plugins = "",
|
78
78
|
yearRange = [ 1900, 2100 ],
|
79
79
|
} = props
|
80
80
|
|
@@ -41,8 +41,9 @@ module Playbook
|
|
41
41
|
required: true
|
42
42
|
prop :placeholder, type: Playbook::Props::String,
|
43
43
|
default: "Select Date"
|
44
|
-
prop :plugins, type: Playbook::Props::
|
45
|
-
|
44
|
+
prop :plugins, type: Playbook::Props::Enum,
|
45
|
+
values: %w[ws ms],
|
46
|
+
default: []
|
46
47
|
prop :required, type: Playbook::Props::Boolean,
|
47
48
|
default: false
|
48
49
|
prop :year_range, type: Playbook::Props::Array,
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import flatpickr from 'flatpickr'
|
2
2
|
import monthSelectPlugin from 'flatpickr/dist/plugins/monthSelect'
|
3
|
+
import weekSelect from "flatpickr/dist/plugins/weekSelect/weekSelect"
|
3
4
|
|
4
5
|
const datePickerHelper = (config) => {
|
5
6
|
const {
|
@@ -52,9 +53,15 @@ const datePickerHelper = (config) => {
|
|
52
53
|
}
|
53
54
|
}
|
54
55
|
|
55
|
-
const
|
56
|
-
|
57
|
-
|
56
|
+
const setPlugin = () => {
|
57
|
+
let p
|
58
|
+
if (plugins === "ms") {
|
59
|
+
p = [ monthSelectPlugin({ shorthand: true, dateFormat: 'F Y', altFormat: 'F Y' }) ]
|
60
|
+
} else if ( plugins === "ws") {
|
61
|
+
p = [ weekSelect({shorthand: true, dateFormat: 'F Y', altFormat: 'F Y' })]
|
62
|
+
} else p = []
|
63
|
+
return p
|
64
|
+
}
|
58
65
|
|
59
66
|
// ===========================================================
|
60
67
|
// | Flatpickr initializer w/ config |
|
@@ -98,12 +105,12 @@ const datePickerHelper = (config) => {
|
|
98
105
|
window.removeEventListener('resize', calendarResizer)
|
99
106
|
}],
|
100
107
|
onChange: [(selectedDates, dateStr) => {
|
101
|
-
onChange(dateStr, selectedDates)
|
108
|
+
onChange(dateStr, selectedDates)
|
102
109
|
}],
|
103
110
|
onYearChange: [() => {
|
104
111
|
yearChangeHook()
|
105
112
|
}],
|
106
|
-
plugins:
|
113
|
+
plugins: setPlugin(),
|
107
114
|
prevArrow: '<i class="far fa-angle-left"></i>',
|
108
115
|
static: true,
|
109
116
|
})
|
@@ -162,8 +169,10 @@ const datePickerHelper = (config) => {
|
|
162
169
|
// Adding dropdown icons to year and month selects
|
163
170
|
dropdown.insertAdjacentHTML('afterend', '<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>')
|
164
171
|
if (picker.monthElements[0].parentElement) {
|
165
|
-
return picker.monthElements[0].insertAdjacentHTML('afterend', '<i class="far fa-angle-down month-dropdown-icon"></i>')
|
166
|
-
|
172
|
+
return picker.monthElements[0].insertAdjacentHTML('afterend', '<i class="far fa-angle-down month-dropdown-icon"></i>')}
|
173
|
+
// if (picker.weekElements[0].parentElement){
|
174
|
+
// return picker.weekElements[0].insertAdjacentHTML('afterend', '<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>')
|
175
|
+
// }
|
167
176
|
|
168
177
|
// Remove readonly attribute for validation and or text input
|
169
178
|
if (allowInput){
|
@@ -1 +1 @@
|
|
1
|
-
<%= pb_rails("date_picker", props: { picker_id: "date-picker-default" }) %>
|
1
|
+
<%= pb_rails("date_picker", props: { picker_id: "date-picker-default", plugins: "ws" }) %>
|
@@ -1 +1 @@
|
|
1
|
-
By default month&year plugin is disabled. To activate it set `plugins` prop to `
|
1
|
+
By default month&year plugin is disabled. To activate it set `plugins` prop to `ms`.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import DatePicker from '../_date_picker'
|
4
|
+
|
5
|
+
const DatePickerWeek = (props) => {
|
6
|
+
return (
|
7
|
+
<div>
|
8
|
+
<DatePicker
|
9
|
+
label="Date Picker"
|
10
|
+
pickerId="week-date-picker"
|
11
|
+
plugins="ws"
|
12
|
+
{...props}
|
13
|
+
/>
|
14
|
+
</div>
|
15
|
+
)
|
16
|
+
}
|
17
|
+
|
18
|
+
export default DatePickerWeek
|
@@ -0,0 +1 @@
|
|
1
|
+
By default month&year plugin is disabled. To activate it set `plugins` prop to `ws`.
|
@@ -17,6 +17,7 @@ examples:
|
|
17
17
|
- date_picker_anti_patterns: Anti-Patterns
|
18
18
|
- date_picker_inline: Inline
|
19
19
|
- date_picker_month_and_year: Month & Year Only
|
20
|
+
- date_picker_week: Week
|
20
21
|
|
21
22
|
|
22
23
|
react:
|
@@ -36,3 +37,4 @@ examples:
|
|
36
37
|
- date_picker_year_range: Year Range
|
37
38
|
- date_picker_inline: Inline
|
38
39
|
- date_picker_month_and_year: Month & Year Only
|
40
|
+
- date_picker_week: Week
|
@@ -14,3 +14,4 @@ export { default as DatePickerFlatpickrMethods } from './_date_picker_flatpickr_
|
|
14
14
|
export { default as DatePickerYearRange } from './_date_picker_year_range.jsx'
|
15
15
|
export { default as DatePickerInline } from './_date_picker_inline.jsx'
|
16
16
|
export { default as DatePickerMonthAndYear } from './_date_picker_month_and_year.jsx'
|
17
|
+
export { default as DatePickerWeek } from './_date_picker_week.jsx'
|
@@ -0,0 +1,127 @@
|
|
1
|
+
@import "../../tokens/colors";
|
2
|
+
|
3
|
+
|
4
|
+
.numInput {
|
5
|
+
border-left: none !important;
|
6
|
+
}
|
7
|
+
|
8
|
+
// Manual Import
|
9
|
+
.flatpickr-monthSelect-months {
|
10
|
+
margin: 10px 1px 3px 1px;
|
11
|
+
flex-wrap: wrap;
|
12
|
+
}
|
13
|
+
|
14
|
+
.flatpickr-monthSelect-month {
|
15
|
+
background: none;
|
16
|
+
border: 1px solid transparent;
|
17
|
+
border-radius: 4px;
|
18
|
+
-webkit-box-sizing: border-box;
|
19
|
+
box-sizing: border-box;
|
20
|
+
color: $text_lt_default;
|
21
|
+
cursor: pointer;
|
22
|
+
display: inline-block;
|
23
|
+
font-weight: 400;
|
24
|
+
margin: 0.5px;
|
25
|
+
justify-content: center;
|
26
|
+
padding: 10px;
|
27
|
+
position: relative;
|
28
|
+
-webkit-box-pack: center;
|
29
|
+
-webkit-justify-content: center;
|
30
|
+
-ms-flex-pack: center;
|
31
|
+
text-align: center;
|
32
|
+
width: 33%;
|
33
|
+
}
|
34
|
+
|
35
|
+
.flatpickr-monthSelect-month.flatpickr-disabled {
|
36
|
+
color: #eee;
|
37
|
+
}
|
38
|
+
|
39
|
+
.flatpickr-monthSelect-month.flatpickr-disabled:hover,
|
40
|
+
.flatpickr-monthSelect-month.flatpickr-disabled:focus {
|
41
|
+
cursor: not-allowed;
|
42
|
+
background: none !important;
|
43
|
+
}
|
44
|
+
|
45
|
+
.flatpickr-monthSelect-theme-dark {
|
46
|
+
background: #3f4458;
|
47
|
+
}
|
48
|
+
|
49
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-current-month input.cur-year {
|
50
|
+
color: #fff;
|
51
|
+
}
|
52
|
+
|
53
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-months .flatpickr-prev-month,
|
54
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-months .flatpickr-next-month {
|
55
|
+
color: #fff;
|
56
|
+
fill: #fff;
|
57
|
+
}
|
58
|
+
|
59
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month {
|
60
|
+
color: rgba(255, 255, 255, 0.95);
|
61
|
+
}
|
62
|
+
|
63
|
+
.flatpickr-monthSelect-month.today {
|
64
|
+
border-color: #959ea9;
|
65
|
+
}
|
66
|
+
|
67
|
+
.flatpickr-monthSelect-month.inRange,
|
68
|
+
.flatpickr-monthSelect-month.inRange.today,
|
69
|
+
.flatpickr-monthSelect-month:hover,
|
70
|
+
.flatpickr-monthSelect-month:focus {
|
71
|
+
background: $active_light;
|
72
|
+
font-weight: $bold;
|
73
|
+
color: $text_lt_default;
|
74
|
+
cursor: pointer;
|
75
|
+
outline: 0;
|
76
|
+
}
|
77
|
+
|
78
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month.inRange,
|
79
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month:hover,
|
80
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month:focus {
|
81
|
+
background: #646c8c;
|
82
|
+
border-color: #646c8c;
|
83
|
+
}
|
84
|
+
|
85
|
+
.flatpickr-monthSelect-month.today:hover,
|
86
|
+
.flatpickr-monthSelect-month.today:focus {
|
87
|
+
background: #959ea9;
|
88
|
+
border-color: #959ea9;
|
89
|
+
color: #fff;
|
90
|
+
}
|
91
|
+
|
92
|
+
.flatpickr-monthSelect-month.selected,
|
93
|
+
.flatpickr-monthSelect-month.startRange,
|
94
|
+
.flatpickr-monthSelect-month.endRange {
|
95
|
+
background-color: $primary;
|
96
|
+
font-weight: $bold;
|
97
|
+
box-shadow: none;
|
98
|
+
color: #fff;
|
99
|
+
border-color: $primary;
|
100
|
+
}
|
101
|
+
|
102
|
+
.flatpickr-monthSelect-month.startRange {
|
103
|
+
border-radius: 50px 0 0 50px;
|
104
|
+
}
|
105
|
+
|
106
|
+
.flatpickr-monthSelect-month.endRange {
|
107
|
+
border-radius: 0 50px 50px 0;
|
108
|
+
}
|
109
|
+
|
110
|
+
.flatpickr-monthSelect-month.startRange.endRange {
|
111
|
+
border-radius: 50px;
|
112
|
+
}
|
113
|
+
|
114
|
+
.flatpickr-monthSelect-month.inRange {
|
115
|
+
border-radius: 0;
|
116
|
+
box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
117
|
+
}
|
118
|
+
|
119
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month.selected,
|
120
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month.startRange,
|
121
|
+
.flatpickr-monthSelect-theme-dark .flatpickr-monthSelect-month.endRange {
|
122
|
+
background: #80cbc4;
|
123
|
+
-webkit-box-shadow: none;
|
124
|
+
box-shadow: none;
|
125
|
+
color: #fff;
|
126
|
+
border-color: #80cbc4;
|
127
|
+
}
|
@@ -1,11 +1,10 @@
|
|
1
|
-
/* @flow */
|
2
|
-
|
3
1
|
import React from 'react'
|
4
2
|
import classnames from 'classnames'
|
5
3
|
import { buildCss, buildDataProps } from '../utilities/props'
|
6
|
-
import { globalProps } from '../utilities/globalProps'
|
4
|
+
import { GlobalProps, globalProps } from '../utilities/globalProps'
|
5
|
+
|
7
6
|
type FlexProps = {
|
8
|
-
children:
|
7
|
+
children: React.ReactChild[] | React.ReactNode,
|
9
8
|
className?: string,
|
10
9
|
data?: object,
|
11
10
|
horizontal?: "left" | "center" | "right" | "stretch" | "none",
|
@@ -22,7 +21,7 @@ type FlexProps = {
|
|
22
21
|
columnGap?: "xs" | "sm" | "md" | "lg" | "xl" | "none",
|
23
22
|
wrap?: boolean,
|
24
23
|
alignSelf?: "start" | "end" | "center" | "stretch" | "none"
|
25
|
-
}
|
24
|
+
} & GlobalProps
|
26
25
|
|
27
26
|
const Flex = (props: FlexProps) => {
|
28
27
|
const {
|
@@ -43,6 +42,7 @@ const Flex = (props: FlexProps) => {
|
|
43
42
|
wrap = false,
|
44
43
|
alignSelf = 'none',
|
45
44
|
} = props
|
45
|
+
|
46
46
|
const orientationClass =
|
47
47
|
orientation !== undefined ? `orientation_${orientation}` : ''
|
48
48
|
const justifyClass =
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* @flow */
|
2
2
|
import React from 'react'
|
3
3
|
import classnames from 'classnames'
|
4
|
-
import Title from '../pb_title/_title
|
5
|
-
import Icon from '../pb_icon/_icon
|
4
|
+
import Title from '../pb_title/_title'
|
5
|
+
import Icon from '../pb_icon/_icon'
|
6
6
|
import Avatar from '../pb_avatar/_avatar'
|
7
7
|
import { globalProps } from '../utilities/globalProps'
|
8
8
|
|
@@ -8,7 +8,7 @@ type HighlightProps = {
|
|
8
8
|
className?: string,
|
9
9
|
data?: {[key: string]: string},
|
10
10
|
id?: string,
|
11
|
-
children?: React.ReactChild[] | string,
|
11
|
+
children?: React.ReactChild[] | React.ReactChild | string,
|
12
12
|
text?: string,
|
13
13
|
highlightedText?: string[],
|
14
14
|
} & GlobalProps
|
@@ -1,16 +1,14 @@
|
|
1
|
-
/* @flow */
|
2
|
-
|
3
1
|
import React from 'react'
|
4
2
|
import classnames from 'classnames'
|
5
3
|
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
6
|
-
import { globalProps } from '../utilities/globalProps'
|
4
|
+
import { GlobalProps, globalProps } from '../utilities/globalProps'
|
7
5
|
|
8
6
|
type IconProps = {
|
9
|
-
aria?:
|
10
|
-
border?:
|
7
|
+
aria?: {[key: string]: string},
|
8
|
+
border?: string,
|
11
9
|
className?: string,
|
12
|
-
customIcon?: SVGElement,
|
13
|
-
data?:
|
10
|
+
customIcon?: {[key: string] :SVGElement},
|
11
|
+
data?: {[key: string]: string},
|
14
12
|
fixedWidth?: boolean,
|
15
13
|
flip?: "horizontal" | "vertical" | "both" | "none",
|
16
14
|
icon: string,
|
@@ -34,12 +32,13 @@ type IconProps = {
|
|
34
32
|
| "9x"
|
35
33
|
| "10x",
|
36
34
|
spin?: boolean,
|
37
|
-
}
|
35
|
+
} & GlobalProps
|
38
36
|
|
39
37
|
const flipMap = {
|
40
38
|
horizontal: 'fa-flip-horizontal',
|
41
39
|
vertical: 'fa-flip-vertical',
|
42
40
|
both: 'fa-flip-horizontal fa-flip-vertical',
|
41
|
+
none: ""
|
43
42
|
}
|
44
43
|
|
45
44
|
const Icon = (props: IconProps) => {
|
@@ -50,7 +49,7 @@ const Icon = (props: IconProps) => {
|
|
50
49
|
customIcon,
|
51
50
|
data = {},
|
52
51
|
fixedWidth = true,
|
53
|
-
flip =
|
52
|
+
flip = "none",
|
54
53
|
icon,
|
55
54
|
id,
|
56
55
|
inverse = false,
|
@@ -90,31 +89,42 @@ const Icon = (props: IconProps) => {
|
|
90
89
|
)
|
91
90
|
|
92
91
|
aria.label ? null : aria.label = `${icon} icon`
|
93
|
-
const ariaProps = buildAriaProps(aria)
|
94
|
-
const dataProps = buildDataProps(data)
|
92
|
+
const ariaProps: {[key: string]: any} = buildAriaProps(aria)
|
93
|
+
const dataProps: {[key: string]: any} = buildDataProps(data)
|
95
94
|
|
96
95
|
// Add a conditional here to show only the SVG if custom
|
96
|
+
const displaySVG = (customIcon: any) => {
|
97
|
+
if (customIcon)
|
98
|
+
return (
|
99
|
+
<>
|
100
|
+
{
|
101
|
+
React.cloneElement(customIcon, {
|
102
|
+
...dataProps,
|
103
|
+
className: classes,
|
104
|
+
id,
|
105
|
+
})
|
106
|
+
}
|
107
|
+
</>
|
108
|
+
)
|
109
|
+
else
|
110
|
+
return (
|
111
|
+
<>
|
112
|
+
<i
|
113
|
+
{...dataProps}
|
114
|
+
className={classes}
|
115
|
+
id={id}
|
116
|
+
/>
|
117
|
+
<span
|
118
|
+
{...ariaProps}
|
119
|
+
hidden
|
120
|
+
/>
|
121
|
+
</>
|
122
|
+
)
|
123
|
+
}
|
124
|
+
|
97
125
|
return (
|
98
126
|
<>
|
99
|
-
|
100
|
-
{
|
101
|
-
React.cloneElement(customIcon, {
|
102
|
-
...dataProps,
|
103
|
-
className: classes,
|
104
|
-
id,
|
105
|
-
})
|
106
|
-
}
|
107
|
-
<Else />
|
108
|
-
<i
|
109
|
-
{...dataProps}
|
110
|
-
className={classes}
|
111
|
-
id={id}
|
112
|
-
/>
|
113
|
-
<span
|
114
|
-
{...ariaProps}
|
115
|
-
hidden
|
116
|
-
/>
|
117
|
-
</If>
|
127
|
+
{displaySVG(customIcon)}
|
118
128
|
</>
|
119
129
|
)
|
120
130
|
}
|
@@ -1,21 +1,19 @@
|
|
1
|
-
/* @flow */
|
2
|
-
|
3
1
|
import React from 'react'
|
4
2
|
|
5
3
|
import classnames from 'classnames'
|
6
|
-
import Title from '../pb_title/_title
|
4
|
+
import Title from '../pb_title/_title'
|
7
5
|
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
8
|
-
import { globalProps } from '../utilities/globalProps'
|
6
|
+
import { GlobalProps, globalProps } from '../utilities/globalProps'
|
9
7
|
|
10
8
|
type PillProps = {
|
11
|
-
aria?:
|
9
|
+
aria?: {[key: string]: string},
|
12
10
|
className?: string,
|
13
|
-
data?:
|
11
|
+
data?: {[key: string]: string},
|
14
12
|
id?: string,
|
15
13
|
text: string,
|
16
14
|
variant?: "success" | "warning" | "error" | "info" | "neutral",
|
17
15
|
textTransform?: "none" | "lowercase"
|
18
|
-
}
|
16
|
+
} & GlobalProps
|
19
17
|
|
20
18
|
const Pill = (props: PillProps) => {
|
21
19
|
const {
|
@@ -49,4 +47,4 @@ const Pill = (props: PillProps) => {
|
|
49
47
|
)
|
50
48
|
}
|
51
49
|
|
52
|
-
export default Pill
|
50
|
+
export default Pill
|