playbook_ui 6.0.1.pre.alpha4 → 6.1.0.pre.alpha2
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 +3 -1
- data/app/pb_kits/playbook/data/menu.yml +4 -2
- data/app/pb_kits/playbook/index.js +2 -0
- data/app/pb_kits/playbook/packs/examples.js +5 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +2 -2
- data/app/pb_kits/playbook/pb_badge/_badge.jsx +2 -5
- data/app/pb_kits/playbook/pb_badge/_badge.scss +1 -1
- data/app/pb_kits/playbook/pb_badge/badge.rb +1 -6
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +2 -2
- data/app/pb_kits/playbook/pb_body/_body.jsx +3 -6
- data/app/pb_kits/playbook/pb_body/_body.scss +6 -0
- data/app/pb_kits/playbook/pb_body/body.rb +2 -8
- data/app/pb_kits/playbook/pb_button/_button.jsx +2 -5
- data/app/pb_kits/playbook/pb_button/_button.scss +1 -1
- data/app/pb_kits/playbook/pb_button/button.rb +1 -7
- data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +2 -0
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.html.erb +7 -0
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +52 -0
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +101 -0
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb +29 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb +7 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +29 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb +7 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +34 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.html.erb +11 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.jsx +29 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb +11 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.jsx +34 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/example.yml +15 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_caption/_caption.jsx +3 -7
- data/app/pb_kits/playbook/pb_caption/_caption.scss +0 -4
- data/app/pb_kits/playbook/pb_caption/caption.rb +1 -8
- data/app/pb_kits/playbook/pb_card/_card.jsx +17 -14
- data/app/pb_kits/playbook/pb_card/_card.scss +4 -1
- data/app/pb_kits/playbook/pb_card/card.rb +2 -9
- data/app/pb_kits/playbook/pb_card/docs/_card_dark.html.erb +1 -1
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +2 -2
- data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +1 -8
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +2 -2
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -2
- data/app/pb_kits/playbook/pb_contact/_contact.jsx +2 -2
- data/app/pb_kits/playbook/pb_currency/_currency.jsx +2 -2
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.js +26 -0
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/_date.jsx +4 -4
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +2 -2
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +2 -2
- data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +2 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +2 -2
- data/app/pb_kits/playbook/pb_flex/_flex.jsx +2 -2
- data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +2 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +2 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +2 -2
- data/app/pb_kits/playbook/pb_gauge/_gauge.html.erb +12 -0
- data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +110 -0
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +11 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +11 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +17 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +12 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +18 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +14 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +20 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +15 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +23 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +40 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +15 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +21 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +1 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +26 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +37 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +1 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +14 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +20 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +29 -0
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +29 -0
- data/app/pb_kits/playbook/pb_gauge/docs/example.yml +24 -0
- data/app/pb_kits/playbook/pb_gauge/docs/index.js +9 -0
- data/app/pb_kits/playbook/pb_gauge/gauge.rb +57 -0
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.jsx +2 -2
- data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +2 -2
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +2 -2
- data/app/pb_kits/playbook/pb_icon/_icon.jsx +2 -2
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx +2 -2
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +2 -2
- data/app/pb_kits/playbook/pb_image/_image.jsx +2 -2
- data/app/pb_kits/playbook/pb_kit/dateTime.js +5 -1
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +2 -2
- data/app/pb_kits/playbook/pb_label_value/_label_value.jsx +2 -2
- data/app/pb_kits/playbook/pb_layout/_layout.jsx +6 -6
- data/app/pb_kits/playbook/pb_legend/_legend.jsx +2 -2
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +2 -2
- data/app/pb_kits/playbook/pb_list/_list.jsx +2 -2
- data/app/pb_kits/playbook/pb_list/_list_item.jsx +2 -2
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.jsx +2 -2
- data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +111 -0
- data/app/pb_kits/playbook/pb_message/_message.jsx +2 -2
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +2 -2
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_nav/_nav.jsx +2 -2
- data/app/pb_kits/playbook/pb_online_status/_online_status.jsx +2 -2
- data/app/pb_kits/playbook/pb_person/_person.jsx +2 -2
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +2 -2
- data/app/pb_kits/playbook/pb_pill/_pill.jsx +2 -2
- data/app/pb_kits/playbook/pb_popover/_popover.jsx +2 -2
- data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +5 -5
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.jsx +2 -2
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +2 -2
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +2 -2
- data/app/pb_kits/playbook/pb_radio/_radio.jsx +2 -2
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +2 -2
- data/app/pb_kits/playbook/pb_select/_select.jsx +2 -2
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.jsx +12 -16
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +1 -7
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.jsx +26 -26
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +1 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.rb +1 -8
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.jsx +8 -10
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +1 -1
- data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +1 -7
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +2 -2
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +2 -2
- data/app/pb_kits/playbook/pb_table/_table.jsx +2 -2
- data/app/pb_kits/playbook/pb_table/_table_row.jsx +2 -2
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +2 -2
- data/app/pb_kits/playbook/pb_textarea/_textarea.html.erb +1 -1
- data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +2 -2
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +2 -1
- data/app/pb_kits/playbook/pb_time/_time.jsx +57 -14
- data/app/pb_kits/playbook/pb_time/_time.scss +17 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +27 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_dark.jsx +28 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +28 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +32 -0
- data/app/pb_kits/playbook/pb_time/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_time/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +2 -2
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +2 -2
- data/app/pb_kits/playbook/pb_title/_title.jsx +3 -6
- data/app/pb_kits/playbook/pb_title/_title.scss +1 -1
- data/app/pb_kits/playbook/pb_title/title.rb +1 -9
- data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +2 -2
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +2 -2
- data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +39 -31
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom.jsx +31 -0
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom_radio.html.erb +6 -6
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom_radio.jsx +72 -0
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default.html.erb +1 -3
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default.jsx +6 -19
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name.jsx +57 -0
- data/app/pb_kits/playbook/pb_toggle/docs/{_toggle_checked.html.erb → _toggle_size.html.erb} +2 -2
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx +44 -0
- data/app/pb_kits/playbook/pb_toggle/docs/example.yml +8 -5
- data/app/pb_kits/playbook/pb_toggle/docs/index.js +4 -2
- data/app/pb_kits/playbook/pb_user/_user.jsx +2 -2
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +2 -2
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx +2 -2
- data/app/pb_kits/playbook/plugins/pb_chart.js +74 -0
- data/app/pb_kits/playbook/props.rb +6 -0
- data/app/pb_kits/playbook/utilities/{spacing.js → globalProps.js} +14 -1
- data/app/pb_kits/playbook/utilities/props.js +1 -0
- data/lib/generators/kit/templates/kit_jsx.erb.tt +2 -2
- data/lib/playbook/version.rb +1 -1
- metadata +53 -6
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_accessibility.jsx +0 -12
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_data.jsx +0 -15
@@ -5,7 +5,7 @@ import Body from '../pb_body/_body.jsx'
|
|
5
5
|
import Icon from '../pb_icon/_icon.jsx'
|
6
6
|
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
7
7
|
import classnames from 'classnames'
|
8
|
-
import {
|
8
|
+
import { globalProps } from '../utilities/globalProps.js'
|
9
9
|
|
10
10
|
type CheckboxProps = {
|
11
11
|
aria?: object,
|
@@ -41,7 +41,7 @@ const Checkbox = (props: CheckboxProps) => {
|
|
41
41
|
const dataProps = buildDataProps(data)
|
42
42
|
const ariaProps = buildAriaProps(aria)
|
43
43
|
const classes = classnames(buildCss('pb_checkbox_kit',
|
44
|
-
{
|
44
|
+
{ checked: checked, error: error }), className, globalProps(props))
|
45
45
|
|
46
46
|
return (
|
47
47
|
<label
|
@@ -7,11 +7,8 @@ module Playbook
|
|
7
7
|
include ActionView::Helpers::FormTagHelper
|
8
8
|
include ActionView::Context
|
9
9
|
|
10
|
-
|
11
|
-
|
12
10
|
partial "pb_checkbox/checkbox"
|
13
11
|
|
14
|
-
prop :dark, type: Playbook::Props::Boolean, default: false
|
15
12
|
prop :error, type: Playbook::Props::Boolean, default: false
|
16
13
|
prop :checked, type: Playbook::Props::Boolean, default: false
|
17
14
|
prop :text
|
@@ -23,7 +20,7 @@ module Playbook
|
|
23
20
|
end
|
24
21
|
|
25
22
|
def classname
|
26
|
-
generate_classname("pb_checkbox_kit",
|
23
|
+
generate_classname("pb_checkbox_kit", checked_class) + error_class
|
27
24
|
end
|
28
25
|
|
29
26
|
def input
|
@@ -43,10 +40,6 @@ module Playbook
|
|
43
40
|
def checked_class
|
44
41
|
checked ? "on" : "off"
|
45
42
|
end
|
46
|
-
|
47
|
-
def dark_class
|
48
|
-
dark ? "dark" : nil
|
49
|
-
end
|
50
43
|
end
|
51
44
|
end
|
52
45
|
end
|
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
noop,
|
12
12
|
} from '../utilities/props'
|
13
13
|
|
14
|
-
import {
|
14
|
+
import { globalProps } from '../utilities/globalProps.js'
|
15
15
|
|
16
16
|
type CircleIconButtonProps = {
|
17
17
|
aria?: object,
|
@@ -46,7 +46,7 @@ const CircleIconButton = (props: CircleIconButtonProps) => {
|
|
46
46
|
|
47
47
|
const ariaProps = buildAriaProps(aria)
|
48
48
|
const dataProps = buildDataProps(data)
|
49
|
-
const classes = classnames(buildCss('pb_circle_icon_button_kit'), className,
|
49
|
+
const classes = classnames(buildCss('pb_circle_icon_button_kit'), className, globalProps(props))
|
50
50
|
|
51
51
|
return (
|
52
52
|
<div
|
@@ -14,8 +14,6 @@ module Playbook
|
|
14
14
|
prop :disabled, type: Playbook::Props::Boolean,
|
15
15
|
default: false
|
16
16
|
prop :icon, required: true
|
17
|
-
prop :dark, type: Playbook::Props::Boolean,
|
18
|
-
default: false
|
19
17
|
prop :link
|
20
18
|
prop :new_window, type: Playbook::Props::Boolean,
|
21
19
|
default: false
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
|
-
import {
|
5
|
+
import { globalProps } from '../utilities/globalProps.js'
|
6
6
|
import { Body, Caption, Icon } from '../'
|
7
7
|
|
8
8
|
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
@@ -58,7 +58,7 @@ const Contact = (props: ContactProps) => {
|
|
58
58
|
id } = props
|
59
59
|
const ariaProps = buildAriaProps(aria)
|
60
60
|
const dataProps = buildDataProps(data)
|
61
|
-
const classes = classnames(buildCss('pb_contact_kit'), className,
|
61
|
+
const classes = classnames(buildCss('pb_contact_kit'), className, globalProps(props))
|
62
62
|
|
63
63
|
return (
|
64
64
|
<div
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
5
|
|
6
|
-
import {
|
6
|
+
import { globalProps } from '../utilities/globalProps.js'
|
7
7
|
import { Body, Caption, Title } from '../'
|
8
8
|
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
9
9
|
|
@@ -45,7 +45,7 @@ const Currency = (props: CurrencyProps) => {
|
|
45
45
|
const [whole, decimal = '00'] = amount.split('.')
|
46
46
|
const ariaProps = buildAriaProps(aria)
|
47
47
|
const dataProps = buildDataProps(data)
|
48
|
-
const classes = classnames(buildCss('pb_currency_kit', align, size, { dark: dark }), className,
|
48
|
+
const classes = classnames(buildCss('pb_currency_kit', align, size, { dark: dark }), className, globalProps(props))
|
49
49
|
|
50
50
|
return (
|
51
51
|
<div
|
@@ -124,6 +124,13 @@ const highchartsTheme = {
|
|
124
124
|
fontSize: typography.text_smaller,
|
125
125
|
},
|
126
126
|
},
|
127
|
+
// specific to gauge
|
128
|
+
// unfilled gauge color
|
129
|
+
pane: {
|
130
|
+
background: {
|
131
|
+
borderColor: colors.border_light,
|
132
|
+
},
|
133
|
+
},
|
127
134
|
|
128
135
|
plotOptions: {
|
129
136
|
series: {
|
@@ -144,6 +151,25 @@ const highchartsTheme = {
|
|
144
151
|
threshold: null,
|
145
152
|
},
|
146
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_lt_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
|
+
|
147
173
|
// PIE STYLES
|
148
174
|
pie: {
|
149
175
|
colors: [
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
5
|
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
6
|
-
import {
|
6
|
+
import { globalProps } from '../utilities/globalProps.js'
|
7
7
|
import {
|
8
8
|
Body,
|
9
9
|
StatChange,
|
@@ -41,7 +41,7 @@ const DashboardValue = (props: DashboardValueProps) => {
|
|
41
41
|
|
42
42
|
const ariaProps = buildAriaProps(aria)
|
43
43
|
const dataProps = buildDataProps(data)
|
44
|
-
const classes = classnames(buildCss('pb_dashboard_value_kit', align), className,
|
44
|
+
const classes = classnames(buildCss('pb_dashboard_value_kit', align), className, globalProps(props))
|
45
45
|
|
46
46
|
return (
|
47
47
|
<div
|
@@ -4,7 +4,7 @@ import React from 'react'
|
|
4
4
|
import DateTime from '../pb_kit/dateTime.js'
|
5
5
|
import { Icon } from '../'
|
6
6
|
import classnames from 'classnames'
|
7
|
-
import {
|
7
|
+
import { globalProps } from '../utilities/globalProps.js'
|
8
8
|
|
9
9
|
const defaultDateString = (value: DateTime) => {
|
10
10
|
const weekday = value.toWeekday().toUpperCase()
|
@@ -26,13 +26,13 @@ type DateSubcomponent = {
|
|
26
26
|
}
|
27
27
|
|
28
28
|
const ExtraSmallDate = ({ value, ...props }: DateSubcomponent) => (
|
29
|
-
<h3 className={classnames('pb_title_kit_4',
|
29
|
+
<h3 className={classnames('pb_title_kit_4', globalProps(props))}>
|
30
30
|
{defaultDateString(value)}
|
31
31
|
</h3>
|
32
32
|
)
|
33
33
|
|
34
34
|
const SmallDate = ({ value, ...props }: DateSubcomponent) => (
|
35
|
-
<h3 className={classnames('pb_title_kit_4',
|
35
|
+
<h3 className={classnames('pb_title_kit_4', globalProps(props))}>
|
36
36
|
<Icon
|
37
37
|
fixedWidth
|
38
38
|
icon="calendar"
|
@@ -42,7 +42,7 @@ const SmallDate = ({ value, ...props }: DateSubcomponent) => (
|
|
42
42
|
)
|
43
43
|
|
44
44
|
const LargeDate = ({ value, ...props }: DateSubcomponent) => (
|
45
|
-
<h3 className={classnames('pb_title_kit_3',
|
45
|
+
<h3 className={classnames('pb_title_kit_3', globalProps(props))}>
|
46
46
|
{largeDateString(value)}
|
47
47
|
</h3>
|
48
48
|
)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React, { useEffect } from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
5
|
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
6
|
-
import {
|
6
|
+
import { globalProps } from '../utilities/globalProps.js'
|
7
7
|
// import flatpickr from 'flatpickr'
|
8
8
|
import { Body, Caption } from '../'
|
9
9
|
import datePickerHelper from './date_picker_helper.js'
|
@@ -51,7 +51,7 @@ const DatePicker = (props: DatePickerProps) => {
|
|
51
51
|
const classes = classnames(
|
52
52
|
buildCss('pb_date_picker_kit'),
|
53
53
|
className,
|
54
|
-
|
54
|
+
globalProps(props),
|
55
55
|
error ? 'error' : null,
|
56
56
|
)
|
57
57
|
|
@@ -4,7 +4,7 @@ import React from 'react'
|
|
4
4
|
import DateTime from '../pb_kit/dateTime.js'
|
5
5
|
import { Body, Icon } from '../'
|
6
6
|
import classnames from 'classnames'
|
7
|
-
import {
|
7
|
+
import { globalProps } from '../utilities/globalProps.js'
|
8
8
|
|
9
9
|
type DateRangeInlineProps = {
|
10
10
|
className?: String,
|
@@ -27,7 +27,7 @@ const dateTimeIso = (dateValue) => {
|
|
27
27
|
const DateRangeInline = (props: DateRangeInlineProps) => {
|
28
28
|
const { endDate, startDate } = props
|
29
29
|
return (
|
30
|
-
<div className={classnames('pb_date_range_inline',
|
30
|
+
<div className={classnames('pb_date_range_inline', globalProps(props))}>
|
31
31
|
<Body
|
32
32
|
color="light"
|
33
33
|
tag="span"
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
5
|
import { buildCss } from '../utilities/props'
|
6
|
-
import {
|
6
|
+
import { globalProps } from '../utilities/globalProps.js'
|
7
7
|
|
8
8
|
import { Body, DateYearStacked, Flex, FlexItem, Icon } from '../'
|
9
9
|
|
@@ -18,7 +18,7 @@ type DateRangeStackedProps = {
|
|
18
18
|
|
19
19
|
const DateRangeStacked = (props: DateRangeStackedProps) => {
|
20
20
|
const { className, dark = false, endDate, startDate } = props
|
21
|
-
const css = classnames(className, buildCss('pb_date_range_stacked'),
|
21
|
+
const css = classnames(className, buildCss('pb_date_range_stacked'), globalProps(props))
|
22
22
|
|
23
23
|
return (
|
24
24
|
<div className={css}>
|
@@ -5,7 +5,7 @@ import classnames from 'classnames'
|
|
5
5
|
import DateTime from '../pb_kit/dateTime.js'
|
6
6
|
import { buildCss } from '../utilities/props'
|
7
7
|
import { Caption, Title } from '../'
|
8
|
-
import {
|
8
|
+
import { globalProps } from '../utilities/globalProps.js'
|
9
9
|
|
10
10
|
type DateStackedProps = {
|
11
11
|
align?: "left" | "center" | "right",
|
@@ -38,7 +38,7 @@ const DateStacked = (props: DateStackedProps) => {
|
|
38
38
|
dark: dark,
|
39
39
|
reverse: reverse,
|
40
40
|
}),
|
41
|
-
|
41
|
+
globalProps(props)
|
42
42
|
)
|
43
43
|
|
44
44
|
const currentYear = new Date().getFullYear().toString()
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import { DateStacked, Flex, FlexItem, TimeStacked } from '../'
|
5
|
-
import {
|
5
|
+
import { globalProps } from '../utilities/globalProps.js'
|
6
6
|
|
7
7
|
type DateTimeStackedProps = {
|
8
8
|
data?: String,
|
@@ -15,7 +15,7 @@ const DateTimeStacked = (props: DateTimeStackedProps) => {
|
|
15
15
|
const { date, dark } = props
|
16
16
|
return (
|
17
17
|
<Flex
|
18
|
-
className={
|
18
|
+
className={globalProps(props)}
|
19
19
|
orientation="row"
|
20
20
|
vertical="center"
|
21
21
|
>
|
@@ -4,7 +4,7 @@ import React from 'react'
|
|
4
4
|
import classnames from 'classnames'
|
5
5
|
import { buildCss } from '../utilities/props'
|
6
6
|
import DateTime from '../pb_kit/dateTime.js'
|
7
|
-
import {
|
7
|
+
import { globalProps } from '../utilities/globalProps.js'
|
8
8
|
|
9
9
|
import { Body, Title } from '../'
|
10
10
|
|
@@ -20,7 +20,7 @@ type DateYearStackedProps = {
|
|
20
20
|
const DateYearStacked = (props: DateYearStackedProps) => {
|
21
21
|
const { align = 'left', className, dark = false, date } = props
|
22
22
|
const dateTimestamp = new DateTime({ value: date })
|
23
|
-
const css = classnames(className, buildCss('pb_date_year_stacked', align),
|
23
|
+
const css = classnames(className, buildCss('pb_date_year_stacked', align), globalProps(props))
|
24
24
|
|
25
25
|
return (
|
26
26
|
<div className={css}>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
|
-
import {
|
5
|
+
import { globalProps } from '../utilities/globalProps.js'
|
6
6
|
|
7
7
|
type DistributionBarProps = {
|
8
8
|
className?: String,
|
@@ -37,7 +37,7 @@ const DistributionBar = (props: DistributionBarProps) => {
|
|
37
37
|
const normalizedValues = normalizeCharacters(widths)
|
38
38
|
|
39
39
|
return (
|
40
|
-
<div className={classnames(`pb_distribution_bar_${size}`,
|
40
|
+
<div className={classnames(`pb_distribution_bar_${size}`, globalProps(props))}>
|
41
41
|
{barValues(normalizedValues)}
|
42
42
|
</div>
|
43
43
|
)
|
@@ -4,7 +4,7 @@ import React, { useCallback } from 'react'
|
|
4
4
|
import { useDropzone } from 'react-dropzone'
|
5
5
|
import { buildCss, noop } from '../utilities/props'
|
6
6
|
import classnames from 'classnames'
|
7
|
-
import {
|
7
|
+
import { globalProps } from '../utilities/globalProps.js'
|
8
8
|
|
9
9
|
import type { Callback } from '../types.js'
|
10
10
|
|
@@ -33,7 +33,7 @@ const FileUpload = (props: FileUploadProps) => {
|
|
33
33
|
|
34
34
|
return (
|
35
35
|
<div
|
36
|
-
className={classnames(buildCss('pb_file_upload_kit', className),
|
36
|
+
className={classnames(buildCss('pb_file_upload_kit', className), globalProps(props))}
|
37
37
|
{...getRootProps()}
|
38
38
|
>
|
39
39
|
<Card>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React, { Node } from 'react'
|
4
4
|
import { Card } from '../../'
|
5
5
|
import classnames from 'classnames'
|
6
|
-
import {
|
6
|
+
import { globalProps } from '../../utilities/globalProps.js'
|
7
7
|
|
8
8
|
type FilterBackgroundProps = {
|
9
9
|
background: boolean,
|
@@ -14,7 +14,7 @@ const FilterBackground = (props: FilterBackgroundProps) => {
|
|
14
14
|
const { background = true, className, children } = props
|
15
15
|
|
16
16
|
return (
|
17
|
-
<div className={classnames(`pb_filter_kit ${className}`,
|
17
|
+
<div className={classnames(`pb_filter_kit ${className}`, globalProps(props))}>
|
18
18
|
<Choose>
|
19
19
|
<When condition={background}>
|
20
20
|
<Card padding="none">{children}</Card>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
5
|
import { Icon, Title } from '../'
|
6
|
-
import {
|
6
|
+
import { globalProps } from '../utilities/globalProps.js'
|
7
7
|
|
8
8
|
const iconMap = {
|
9
9
|
success: 'check',
|
@@ -25,7 +25,7 @@ const FixedConfirmationToast = (props: FixedConfirmationToastProps) => {
|
|
25
25
|
const css = classnames(
|
26
26
|
className,
|
27
27
|
`pb_fixed_confirmation_toast_kit_${status}`,
|
28
|
-
|
28
|
+
globalProps(props)
|
29
29
|
)
|
30
30
|
const icon = iconMap[status]
|
31
31
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
5
|
import { buildCss } from '../utilities/props'
|
6
|
-
import {
|
6
|
+
import { globalProps } from '../utilities/globalProps.js'
|
7
7
|
type FlexProps = {
|
8
8
|
children: Array<React.ReactNode> | React.ReactNode,
|
9
9
|
className?: String,
|
@@ -52,7 +52,7 @@ const Flex = (props: FlexProps) => {
|
|
52
52
|
wrapClass
|
53
53
|
),
|
54
54
|
className,
|
55
|
-
|
55
|
+
globalProps(props)
|
56
56
|
)}
|
57
57
|
>
|
58
58
|
{children}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import React from 'react'
|
3
3
|
import classnames from 'classnames'
|
4
4
|
import { buildCss } from '../utilities/props'
|
5
|
-
import {
|
5
|
+
import { globalProps } from '../utilities/globalProps.js'
|
6
6
|
type FlexItemPropTypes = {
|
7
7
|
children: Array<React.ReactNode> | React.ReactNode,
|
8
8
|
fixedSize: String,
|
@@ -18,7 +18,7 @@ const FlexItem = (props: FlexItemPropTypes) => {
|
|
18
18
|
|
19
19
|
return (
|
20
20
|
<div
|
21
|
-
className={classnames(buildCss('pb_flex_item_kit', growClass), className,
|
21
|
+
className={classnames(buildCss('pb_flex_item_kit', growClass), className, globalProps(props))}
|
22
22
|
style={fixedStyle}
|
23
23
|
>
|
24
24
|
{children}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
]
|
14
14
|
%>
|
15
15
|
|
16
|
-
<%= pb_rails("form", props: { form_system_options: { scope: :
|
16
|
+
<%= pb_rails("form", props: { form_system_options: { scope: :scope, method: :get } }) do |form| %>
|
17
17
|
<%= form.text_field :example_text_field, props: { label: true } %>
|
18
18
|
<%= form.telephone_field :example_phone_field, props: { label: true } %>
|
19
19
|
<%= form.email_field :example_email_field, props: { label: true } %>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<%= form.text_area :example_text_area, props: { label: true } %>
|
25
25
|
<%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true } %>
|
26
26
|
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
|
27
|
-
<%= form.date_picker :
|
27
|
+
<%= form.date_picker :example_date_picker1, props: { default_date: 'blank' } %>
|
28
28
|
|
29
29
|
<%= form.actions do |action| %>
|
30
30
|
<%= action.submit %>
|