playbook_ui 10.19.0 → 10.21.0.pre.alpha.lightbox
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.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -2
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +1 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +4 -0
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +1 -0
- data/app/pb_kits/playbook/pb_body/_body.jsx +3 -1
- data/app/pb_kits/playbook/pb_button/_button.jsx +3 -3
- data/app/pb_kits/playbook/pb_button/_button.scss +18 -1
- data/app/pb_kits/playbook/pb_button/button.rb +11 -3
- data/app/pb_kits/playbook/pb_button/button.test.js +13 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_size.html.erb +3 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_size.jsx +26 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_size.md +1 -0
- data/app/pb_kits/playbook/pb_button/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_caption/_caption.jsx +2 -1
- data/app/pb_kits/playbook/pb_caption/_caption.scss +7 -0
- data/app/pb_kits/playbook/pb_caption/caption.rb +5 -2
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +3 -0
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +1 -0
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.js +215 -0
- data/app/pb_kits/playbook/pb_date/_date.jsx +1 -1
- data/app/pb_kits/playbook/pb_date/date.html.erb +1 -1
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +17 -10
- data/app/pb_kits/playbook/pb_file_upload/fileupload.test.js +40 -0
- data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +3 -0
- data/app/pb_kits/playbook/pb_gauge/gauge.rb +1 -0
- data/app/pb_kits/playbook/pb_image/_image.jsx +1 -1
- data/app/pb_kits/playbook/pb_image/_image.scss +3 -3
- data/app/pb_kits/playbook/pb_image/image.rb +1 -1
- data/app/pb_kits/playbook/pb_image/image.test.js +1 -1
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Slide.jsx +55 -0
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.jsx +54 -0
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.jsx +39 -0
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnails.jsx +82 -0
- data/app/pb_kits/playbook/pb_lightbox/Carousel/index.jsx +59 -0
- data/app/pb_kits/playbook/pb_lightbox/Carousel/styles.scss +110 -0
- data/app/pb_kits/playbook/pb_lightbox/Carousel/useSlides.js +66 -0
- data/app/pb_kits/playbook/pb_lightbox/_lightbox.jsx +112 -0
- data/app/pb_kits/playbook/pb_lightbox/_lightbox_context.jsx +3 -0
- data/app/pb_kits/playbook/pb_lightbox/_lightbox_header.jsx +71 -0
- data/app/pb_kits/playbook/pb_lightbox/_lightbox_header_icon.jsx +26 -0
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_compound_component.jsx +95 -0
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.jsx +64 -0
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.md +1 -0
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_multiple.jsx +64 -0
- data/app/pb_kits/playbook/pb_lightbox/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_lightbox/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +21 -0
- data/app/pb_kits/playbook/pb_lightbox/hooks/useWindowSize.js +25 -0
- data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +90 -0
- data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +30 -0
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +4 -0
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -0
- data/app/pb_kits/playbook/pb_popover/_popover.jsx +2 -4
- data/app/pb_kits/playbook/pb_popover/docs/_popover_close.html.erb +7 -7
- data/app/pb_kits/playbook/pb_popover/index.js +4 -9
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +4 -0
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +2 -2
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +14 -0
- data/app/pb_kits/playbook/pb_title/_title.jsx +2 -1
- data/app/pb_kits/playbook/pb_title/title.rb +5 -2
- data/app/pb_kits/playbook/playbook-doc.js +2 -0
- data/app/pb_kits/playbook/plugins/pb_chart.js +8 -4
- data/lib/playbook/version.rb +2 -2
- metadata +30 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c75501fe979ac41342124f523c7746d81bdab2ece4c13d8a9b3fc8808c5c445
|
4
|
+
data.tar.gz: 63f5a9fc07a22b4e1ca25819e3db56e20927f073f6774bde288a38110694227a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df78b95db1bf1cc80316580d79d38b5d96e02f8161d9b67dfb8d7195894e9f27c2eceb132920d56c21a924082fedb48bc86df78a15f941941587c8ab60d81c6b
|
7
|
+
data.tar.gz: 6f39130d39966ff49e67d5ad511e4c0447b767de0ded3fa22da749802a5552d2102cbb6e01b7f5cb8d05f3717ae35ad6b4acfb47e0598a6c69bc06135df18fe0
|
@@ -4,7 +4,6 @@ import 'lazysizes/plugins/attrchange/ls.attrchange'
|
|
4
4
|
import 'lazysizes'
|
5
5
|
|
6
6
|
// vvv React Component JSX Imports from the React Kits vvv
|
7
|
-
export { default as Walkthrough } from './pb_walkthrough/_walkthrough'
|
8
7
|
export { default as Avatar } from './pb_avatar/_avatar'
|
9
8
|
export { default as AvatarActionButton } from './pb_avatar_action_button/_avatar_action_button'
|
10
9
|
export { default as Background } from './pb_background/_background'
|
@@ -55,6 +54,7 @@ export { default as Layout } from './pb_layout/_layout'
|
|
55
54
|
export { default as Legend } from './pb_legend/_legend'
|
56
55
|
export { default as LineGraph } from './pb_line_graph/_line_graph'
|
57
56
|
export { default as List } from './pb_list/_list'
|
57
|
+
export { default as Lightbox } from './pb_lightbox/_lightbox'
|
58
58
|
export { default as ListItem } from './pb_list/_list_item'
|
59
59
|
export { default as LoadingInline } from './pb_loading_inline/_loading_inline'
|
60
60
|
export { default as Message } from './pb_message/_message'
|
@@ -101,6 +101,7 @@ export { default as Toggle } from './pb_toggle/_toggle'
|
|
101
101
|
export { default as Typeahead } from './pb_typeahead/_typeahead'
|
102
102
|
export { default as User } from './pb_user/_user'
|
103
103
|
export { default as UserBadge } from './pb_user_badge/_user_badge'
|
104
|
+
export { default as Walkthrough } from './pb_walkthrough/_walkthrough'
|
104
105
|
export { default as WeekdayStacked } from './pb_weekday_stacked/_weekday_stacked'
|
105
106
|
// ^^^ React Component JSX Imports from the React Kits ^^^
|
106
107
|
|
@@ -44,7 +44,7 @@ const Avatar = (props: AvatarProps) => {
|
|
44
44
|
const dataProps = buildDataProps(data)
|
45
45
|
const ariaProps = buildAriaProps(aria)
|
46
46
|
const classes = classnames(
|
47
|
-
buildCss('pb_avatar_kit', size),
|
47
|
+
buildCss('pb_avatar_kit', `size_${size}`),
|
48
48
|
globalProps(props),
|
49
49
|
className
|
50
50
|
)
|
@@ -16,8 +16,8 @@ $avatar-sizes: (
|
|
16
16
|
position: relative;
|
17
17
|
|
18
18
|
@each $name, $size in $avatar-sizes {
|
19
|
-
&[class*=
|
20
|
-
&[class*=
|
19
|
+
&[class*=_size_#{$name}],
|
20
|
+
&[class*=_size_#{$name}_thumb] {
|
21
21
|
width: $size;
|
22
22
|
height: $size;
|
23
23
|
object-fit: cover;
|
@@ -22,7 +22,7 @@ test('loads the given image url and name', () => {
|
|
22
22
|
const image = screen.getByAltText(imageAlt)
|
23
23
|
const initials = name.split(/\s/)[0].substr(0, 1) + name.split(/\s/)[1].substr(0, 1)
|
24
24
|
|
25
|
-
expect(kit).toHaveClass('
|
25
|
+
expect(kit).toHaveClass('pb_avatar_kit_size_md')
|
26
26
|
expect(kit).toHaveAttribute('data-initials', initials)
|
27
27
|
expect(image).toHaveAttribute('data-src', imageUrl)
|
28
28
|
expect(image).toHaveAttribute('src', imageUrl)
|
@@ -8,6 +8,7 @@ import pbChart from '../plugins/pb_chart'
|
|
8
8
|
|
9
9
|
type BarGraphProps = {
|
10
10
|
axisTitle: string,
|
11
|
+
dark?: Boolean,
|
11
12
|
xAxisCategories: array,
|
12
13
|
yAxisMin: number,
|
13
14
|
yAxisMax: number,
|
@@ -30,6 +31,7 @@ type BarGraphProps = {
|
|
30
31
|
export default class BarGraph extends React.Component<BarGraphProps> {
|
31
32
|
static defaultProps = {
|
32
33
|
className: 'pb_bar_graph',
|
34
|
+
dark: false,
|
33
35
|
type: 'column',
|
34
36
|
legend: false,
|
35
37
|
toggleLegendClick: true,
|
@@ -38,6 +40,7 @@ export default class BarGraph extends React.Component<BarGraphProps> {
|
|
38
40
|
componentDidMount() {
|
39
41
|
const {
|
40
42
|
axisTitle,
|
43
|
+
dark,
|
41
44
|
xAxisCategories,
|
42
45
|
yAxisMin,
|
43
46
|
yAxisMax,
|
@@ -56,6 +59,7 @@ export default class BarGraph extends React.Component<BarGraphProps> {
|
|
56
59
|
|
57
60
|
new pbChart(`.${className}`, {
|
58
61
|
axisTitle: axisTitle,
|
62
|
+
dark,
|
59
63
|
chartData: chartData,
|
60
64
|
colors: colors,
|
61
65
|
id: id,
|
@@ -21,6 +21,7 @@ type BodyProps = {
|
|
21
21
|
status?: 'negative' | 'neutral' | 'positive',
|
22
22
|
tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
|
23
23
|
text?: string,
|
24
|
+
variant: null | 'link',
|
24
25
|
}
|
25
26
|
|
26
27
|
const Body = (props: BodyProps) => {
|
@@ -36,12 +37,13 @@ const Body = (props: BodyProps) => {
|
|
36
37
|
status,
|
37
38
|
tag = 'div',
|
38
39
|
text,
|
40
|
+
variant = null,
|
39
41
|
} = props
|
40
42
|
|
41
43
|
const ariaProps = buildAriaProps(aria)
|
42
44
|
const dataProps = buildDataProps(data)
|
43
45
|
const classes = classnames(
|
44
|
-
buildCss('pb_body_kit', color, status),
|
46
|
+
buildCss('pb_body_kit', color, variant, status),
|
45
47
|
globalProps(props),
|
46
48
|
className
|
47
49
|
)
|
@@ -22,7 +22,7 @@ type ButtonPropTypes = {
|
|
22
22
|
loading?: boolean,
|
23
23
|
newWindow?: boolean,
|
24
24
|
onClick?: EventHandler,
|
25
|
-
size
|
25
|
+
size?: 'sm' | 'md' | 'lg',
|
26
26
|
text?: string,
|
27
27
|
type: 'inline' | null,
|
28
28
|
htmlType: string | 'button',
|
@@ -36,19 +36,19 @@ const buttonClassName = (props: ButtonPropTypes) => {
|
|
36
36
|
disabled = false,
|
37
37
|
fullWidth = false,
|
38
38
|
loading = false,
|
39
|
-
size = null,
|
40
39
|
type = 'inline',
|
41
40
|
variant = 'primary',
|
41
|
+
size = null,
|
42
42
|
} = props
|
43
43
|
|
44
44
|
let className = 'pb_button_kit'
|
45
45
|
|
46
46
|
className += `${variant !== null ? `_${variant}` : ''}`
|
47
47
|
className += `${type !== null ? `_${type}` : ''}`
|
48
|
-
className += `${size !== null ? `_${size}` : ''}`
|
49
48
|
className += `${fullWidth ? '_block' : ''}`
|
50
49
|
className += disabled ? '_disabled' : '_enabled'
|
51
50
|
className += loading ? '_loading' : ''
|
51
|
+
className += `${size !== null ? ` size_${size}` : ''}`
|
52
52
|
|
53
53
|
return className
|
54
54
|
}
|
@@ -1,7 +1,24 @@
|
|
1
1
|
@import "./button_mixins";
|
2
2
|
|
3
|
-
|
3
|
+
$pb_button_sizes: (
|
4
|
+
"sm": 0.75rem,
|
5
|
+
"md": 0.875rem,
|
6
|
+
"lg": 1.125rem,
|
7
|
+
);
|
8
|
+
|
9
|
+
[class*=pb_button_kit]{
|
4
10
|
@include pb_button;
|
11
|
+
// Size =================
|
12
|
+
@each $name, $size in $pb_button_sizes {
|
13
|
+
&[class*=size_#{$name}] {
|
14
|
+
font-size: $size;
|
15
|
+
padding: calc(#{$size} / 2) calc(#{$size} * 2.42) !important;
|
16
|
+
}
|
17
|
+
@if $name == "sm" {
|
18
|
+
min-height: 0;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
5
22
|
// Variants =================
|
6
23
|
&[class*=_primary] {
|
7
24
|
@include pb_button_primary;
|
@@ -18,6 +18,9 @@ module Playbook
|
|
18
18
|
prop :text
|
19
19
|
prop :type
|
20
20
|
prop :value
|
21
|
+
prop :size, type: Playbook::Props::Enum,
|
22
|
+
values: ["sm", "md", "lg", nil],
|
23
|
+
default: nil
|
21
24
|
|
22
25
|
def options
|
23
26
|
{
|
@@ -44,12 +47,13 @@ module Playbook
|
|
44
47
|
link ? "a" : "button"
|
45
48
|
end
|
46
49
|
|
47
|
-
private
|
48
|
-
|
49
50
|
def classname
|
50
|
-
generate_classname("pb_button_kit", variant, full_width_class, disabled_class, loading_class)
|
51
|
+
button_class = generate_classname("pb_button_kit", variant, full_width_class, disabled_class, loading_class)
|
52
|
+
button_class + size_class
|
51
53
|
end
|
52
54
|
|
55
|
+
private
|
56
|
+
|
53
57
|
def disabled_class
|
54
58
|
disabled ? "disabled" : "enabled"
|
55
59
|
end
|
@@ -61,6 +65,10 @@ module Playbook
|
|
61
65
|
def loading_class
|
62
66
|
loading ? "loading" : nil
|
63
67
|
end
|
68
|
+
|
69
|
+
def size_class
|
70
|
+
size ? " size_#{size}" : ""
|
71
|
+
end
|
64
72
|
end
|
65
73
|
end
|
66
74
|
end
|
@@ -89,3 +89,16 @@ test('click event', async () => {
|
|
89
89
|
|
90
90
|
expect(screen.getByText('clicked button!')).toBeInTheDocument()
|
91
91
|
})
|
92
|
+
|
93
|
+
test('size prop', () => {
|
94
|
+
render(
|
95
|
+
<Button
|
96
|
+
data={{ testid: 'size-test' }}
|
97
|
+
size="sm"
|
98
|
+
/>
|
99
|
+
)
|
100
|
+
|
101
|
+
const kit = screen.getByTestId('size-test')
|
102
|
+
|
103
|
+
expect(kit).toHaveClass('pb_button_kit_primary_inline_enabled size_sm')
|
104
|
+
})
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Button } from '../../'
|
3
|
+
|
4
|
+
const ButtonSize = (props) => (
|
5
|
+
<div>
|
6
|
+
<Button
|
7
|
+
size="sm"
|
8
|
+
text="Button sm size"
|
9
|
+
{...props}
|
10
|
+
/>
|
11
|
+
{' '}
|
12
|
+
<Button
|
13
|
+
size="md"
|
14
|
+
text="Button md size"
|
15
|
+
{...props}
|
16
|
+
/>
|
17
|
+
{' '}
|
18
|
+
<Button
|
19
|
+
size="lg"
|
20
|
+
text="Button lg size"
|
21
|
+
{...props}
|
22
|
+
/>
|
23
|
+
</div>
|
24
|
+
)
|
25
|
+
|
26
|
+
export default ButtonSize
|
@@ -0,0 +1 @@
|
|
1
|
+
By default button has the `md` size style, even if you don't explicitly pass a size prop.
|
@@ -7,6 +7,7 @@ examples:
|
|
7
7
|
- button_block_content: Button Block Content
|
8
8
|
- button_accessibility: Button Accessibility Options
|
9
9
|
- button_options: Button Additional Options
|
10
|
+
- button_size: Button Size
|
10
11
|
react:
|
11
12
|
- button_default: Button Variants
|
12
13
|
- button_full_width: Button Full Width
|
@@ -15,3 +16,4 @@ examples:
|
|
15
16
|
- button_block_content: Button Block Content
|
16
17
|
- button_accessibility: Button Accessibility Options
|
17
18
|
- button_options: Button Additional Options (onClick)
|
19
|
+
- button_size: Button Size
|
@@ -5,3 +5,4 @@ export { default as ButtonLoading } from './_button_loading.jsx'
|
|
5
5
|
export { default as ButtonBlockContent } from './_button_block_content.jsx'
|
6
6
|
export { default as ButtonAccessibility } from './_button_accessibility.jsx'
|
7
7
|
export { default as ButtonOptions } from './_button_options.jsx'
|
8
|
+
export { default as ButtonSize } from './_button_size.jsx'
|
@@ -30,6 +30,7 @@ const Caption = (props: CaptionProps) => {
|
|
30
30
|
size = 'md',
|
31
31
|
tag = 'div',
|
32
32
|
text,
|
33
|
+
variant = null,
|
33
34
|
} = props
|
34
35
|
const tagOptions = [
|
35
36
|
'h1',
|
@@ -48,7 +49,7 @@ const Caption = (props: CaptionProps) => {
|
|
48
49
|
const ariaProps = buildAriaProps(aria)
|
49
50
|
const dataProps = buildDataProps(data)
|
50
51
|
const css = classnames(
|
51
|
-
buildCss('pb_caption_kit', size, color),
|
52
|
+
buildCss('pb_caption_kit', size, variant, color),
|
52
53
|
globalProps(props),
|
53
54
|
className,
|
54
55
|
)
|
@@ -3,6 +3,9 @@
|
|
3
3
|
|
4
4
|
[class^="pb_caption_kit"] {
|
5
5
|
@include caption;
|
6
|
+
&[class*="_link"] {
|
7
|
+
color: $primary;
|
8
|
+
}
|
6
9
|
|
7
10
|
&[class^="pb_caption_kit_lg"] {
|
8
11
|
@include caption_lg;
|
@@ -11,6 +14,10 @@
|
|
11
14
|
&[class^="pb_caption_kit_xs"] {
|
12
15
|
@include caption_xs;
|
13
16
|
}
|
17
|
+
|
18
|
+
&[class*="link"] {
|
19
|
+
color: $primary;
|
20
|
+
}
|
14
21
|
|
15
22
|
@include pb_caption_kit_colors;
|
16
23
|
|
@@ -10,14 +10,17 @@ module Playbook
|
|
10
10
|
values: %w[h1 h2 h3 h4 h5 h6 p span div caption],
|
11
11
|
default: "div"
|
12
12
|
prop :text
|
13
|
-
prop :variant,
|
13
|
+
prop :variant, type: Playbook::Props::Enum,
|
14
|
+
values: [nil, "link"],
|
15
|
+
default: nil,
|
16
|
+
deprecated: true
|
14
17
|
|
15
18
|
prop :color, type: Playbook::Props::Enum,
|
16
19
|
values: [nil, "default", "light", "lighter", "success", "error", "link"],
|
17
20
|
default: nil
|
18
21
|
|
19
22
|
def classname
|
20
|
-
generate_classname("pb_caption_kit", size, color)
|
23
|
+
generate_classname("pb_caption_kit", size, variant, color)
|
21
24
|
end
|
22
25
|
end
|
23
26
|
end
|
@@ -14,6 +14,7 @@ type CircleChartProps = {
|
|
14
14
|
children: Node,
|
15
15
|
className?: string,
|
16
16
|
colors: array,
|
17
|
+
dark?: Boolean,
|
17
18
|
data?: Object,
|
18
19
|
dataLabelHtml: string,
|
19
20
|
dataLabels: boolean,
|
@@ -40,6 +41,7 @@ const CircleChart = (props: CircleChartProps) => {
|
|
40
41
|
children,
|
41
42
|
className,
|
42
43
|
colors = [],
|
44
|
+
dark = false,
|
43
45
|
data = {},
|
44
46
|
dataLabelHtml = '<div>{point.name}</div>',
|
45
47
|
dataLabels = false,
|
@@ -81,6 +83,7 @@ const CircleChart = (props: CircleChartProps) => {
|
|
81
83
|
borderColor: roundedBorderColor,
|
82
84
|
borderWidth: roundedBorderWidth,
|
83
85
|
chartData: formattedChartData,
|
86
|
+
dark,
|
84
87
|
title,
|
85
88
|
type: style,
|
86
89
|
showInLegend: legend,
|
@@ -0,0 +1,215 @@
|
|
1
|
+
import colors from '../tokens/exports/_colors.scss'
|
2
|
+
import typography from '../tokens/exports/_typography.scss'
|
3
|
+
|
4
|
+
import Highcharts from 'highcharts'
|
5
|
+
|
6
|
+
const highchartsDarkTheme = {
|
7
|
+
lang: {
|
8
|
+
thousandsSep: ',',
|
9
|
+
},
|
10
|
+
colors: [
|
11
|
+
colors.data_1,
|
12
|
+
colors.data_2,
|
13
|
+
colors.data_3,
|
14
|
+
colors.data_4,
|
15
|
+
colors.data_5,
|
16
|
+
colors.data_6,
|
17
|
+
colors.data_7,
|
18
|
+
],
|
19
|
+
chart: {
|
20
|
+
borderWidth: 0,
|
21
|
+
borderRadius: 0,
|
22
|
+
plotBackgroundColor: null,
|
23
|
+
plotShadow: false,
|
24
|
+
plotBorderWidth: 0,
|
25
|
+
},
|
26
|
+
title: {
|
27
|
+
style: {
|
28
|
+
color: colors.text_dk_default,
|
29
|
+
fontFamily: typography.font_family_base,
|
30
|
+
fontWeight: typography.regular,
|
31
|
+
fontSize: typography.heading_3,
|
32
|
+
},
|
33
|
+
},
|
34
|
+
subtitle: {
|
35
|
+
style: {
|
36
|
+
fontFamily: typography.font_family_base,
|
37
|
+
color: colors.text_dk_light,
|
38
|
+
fontWeight: typography.regular,
|
39
|
+
fontSize: typography.text_base,
|
40
|
+
},
|
41
|
+
},
|
42
|
+
xAxis: {
|
43
|
+
gridLineWidth: 0,
|
44
|
+
lineColor: colors.border_dark,
|
45
|
+
tickColor: colors.border_dark,
|
46
|
+
labels: {
|
47
|
+
style: {
|
48
|
+
fontFamily: typography.font_family_base,
|
49
|
+
color: colors.text_dk_lighter,
|
50
|
+
fontWeight: typography.bold,
|
51
|
+
fontSize: typography.text_smaller,
|
52
|
+
},
|
53
|
+
},
|
54
|
+
title: {
|
55
|
+
style: {
|
56
|
+
color: colors.text_dk_default,
|
57
|
+
fontFamily: typography.font_family_base,
|
58
|
+
fontWeight: typography.regular,
|
59
|
+
fontSize: typography.heading_4,
|
60
|
+
},
|
61
|
+
},
|
62
|
+
},
|
63
|
+
yAxis: {
|
64
|
+
alternateGridColor: null,
|
65
|
+
minorTickInterval: null,
|
66
|
+
gridLineColor: colors.border_dark,
|
67
|
+
minorGridLineColor: colors.border_dark,
|
68
|
+
lineWidth: 0,
|
69
|
+
tickWidth: 0,
|
70
|
+
labels: {
|
71
|
+
style: {
|
72
|
+
fontFamily: typography.font_family_base,
|
73
|
+
color: colors.text_dk_lighter,
|
74
|
+
fontWeight: typography.bold,
|
75
|
+
fontSize: typography.text_smaller,
|
76
|
+
},
|
77
|
+
},
|
78
|
+
title: {
|
79
|
+
style: {
|
80
|
+
fontFamily: typography.font_family_base,
|
81
|
+
color: colors.text_dk_lighter,
|
82
|
+
fontWeight: typography.bold,
|
83
|
+
fontSize: typography.text_smaller,
|
84
|
+
},
|
85
|
+
},
|
86
|
+
},
|
87
|
+
legend: {
|
88
|
+
layout: 'horizontal',
|
89
|
+
align: 'center',
|
90
|
+
verticalAlign: 'bottom',
|
91
|
+
itemStyle: {
|
92
|
+
fontFamily: typography.font_family_base,
|
93
|
+
color: colors.text_dk_light,
|
94
|
+
fontWeight: typography.regular,
|
95
|
+
fontSize: typography.text_smaller,
|
96
|
+
},
|
97
|
+
itemHoverStyle: {
|
98
|
+
color: colors.text_dk_default,
|
99
|
+
},
|
100
|
+
itemHiddenStyle: {
|
101
|
+
color: colors.text_dk_lighter,
|
102
|
+
},
|
103
|
+
},
|
104
|
+
labels: {
|
105
|
+
style: {
|
106
|
+
color: colors.primary,
|
107
|
+
},
|
108
|
+
},
|
109
|
+
tooltip: {
|
110
|
+
backgroundColor: {
|
111
|
+
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
112
|
+
stops: [
|
113
|
+
[0, colors.card_light],
|
114
|
+
[1, colors.card_light],
|
115
|
+
],
|
116
|
+
},
|
117
|
+
shadow: false,
|
118
|
+
borderWidth: 0,
|
119
|
+
borderRadius: 10,
|
120
|
+
style: {
|
121
|
+
fontFamily: typography.font_family_base,
|
122
|
+
color: colors.text_lt_default,
|
123
|
+
fontWeight: typography.regular,
|
124
|
+
fontSize: typography.text_smaller,
|
125
|
+
},
|
126
|
+
},
|
127
|
+
// specific to gauge
|
128
|
+
// unfilled gauge color
|
129
|
+
pane: {
|
130
|
+
background: {
|
131
|
+
borderColor: colors.border_dark,
|
132
|
+
},
|
133
|
+
},
|
134
|
+
|
135
|
+
plotOptions: {
|
136
|
+
series: {
|
137
|
+
type: 'area',
|
138
|
+
nullColor: colors.text_dk_lighter,
|
139
|
+
fillColor: {
|
140
|
+
linearGradient: {
|
141
|
+
x1: 0,
|
142
|
+
y1: 0,
|
143
|
+
x2: 0,
|
144
|
+
y2: 1,
|
145
|
+
},
|
146
|
+
stops: [
|
147
|
+
[0, Highcharts.getOptions().colors[0]],
|
148
|
+
[1, 'white'],
|
149
|
+
],
|
150
|
+
},
|
151
|
+
threshold: null,
|
152
|
+
},
|
153
|
+
|
154
|
+
// GAUGE STYLES
|
155
|
+
solidgauge: {
|
156
|
+
borderColor: colors.primary,
|
157
|
+
borderWidth: 20,
|
158
|
+
radius: 90,
|
159
|
+
innerRadius: '90%',
|
160
|
+
dataLabels: {
|
161
|
+
borderWidth: 0,
|
162
|
+
color: colors.text_dk_default,
|
163
|
+
enabled: true,
|
164
|
+
style: {
|
165
|
+
fontFamily: typography.font_family_base,
|
166
|
+
fontWeight: typography.regular,
|
167
|
+
fontSize: typography.heading_2,
|
168
|
+
},
|
169
|
+
y: -26,
|
170
|
+
},
|
171
|
+
},
|
172
|
+
|
173
|
+
// PIE STYLES
|
174
|
+
pie: {
|
175
|
+
colors: [
|
176
|
+
colors.data_1,
|
177
|
+
colors.data_2,
|
178
|
+
colors.data_3,
|
179
|
+
colors.data_4,
|
180
|
+
colors.data_5,
|
181
|
+
colors.data_6,
|
182
|
+
colors.data_7,
|
183
|
+
],
|
184
|
+
dataLabels: {
|
185
|
+
style: {
|
186
|
+
fontFamily: typography.font_family_base,
|
187
|
+
fontSize: typography.text_smaller,
|
188
|
+
color: colors.text_dk_light,
|
189
|
+
fontWeight: typography.regular,
|
190
|
+
},
|
191
|
+
},
|
192
|
+
},
|
193
|
+
|
194
|
+
// LINE CHART STYLES
|
195
|
+
line: {
|
196
|
+
dataLabels: {
|
197
|
+
color: colors.text_dk_light,
|
198
|
+
},
|
199
|
+
marker: {
|
200
|
+
lineColor: colors.border_dark,
|
201
|
+
},
|
202
|
+
area: {
|
203
|
+
shadow: false,
|
204
|
+
states: {
|
205
|
+
hover: {
|
206
|
+
lineWidth: 1,
|
207
|
+
},
|
208
|
+
},
|
209
|
+
threshold: null,
|
210
|
+
},
|
211
|
+
},
|
212
|
+
},
|
213
|
+
}
|
214
|
+
|
215
|
+
export { highchartsDarkTheme }
|
@@ -42,7 +42,7 @@
|
|
42
42
|
<%= pb_rails("caption", props: {
|
43
43
|
tag: "div",
|
44
44
|
}) do %>
|
45
|
-
<%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true, size:
|
45
|
+
<%= pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true, size: "sm" }) %>
|
46
46
|
<% end %>
|
47
47
|
<% end %>
|
48
48
|
|