playbook_ui 9.10.0 → 9.14.1.alpha.highcharts9
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 +26 -22
- data/app/pb_kits/playbook/index.js +1 -0
- data/app/pb_kits/playbook/pb_background/background.rb +0 -1
- data/app/pb_kits/playbook/pb_badge/_badge.jsx +26 -1
- data/app/pb_kits/playbook/pb_badge/_badge.scss +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx +51 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.jsx +49 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +55 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.html.erb +9 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.rb +12 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.html.erb +7 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.rb +11 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.test.js +35 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.html.erb +17 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +56 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_button/button.rb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +9 -10
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +4 -2
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +6 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +3 -0
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +45 -11
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +17 -6
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.rb +18 -13
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold.html.erb +5 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold.jsx +38 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.jsx +32 -16
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +23 -4
- data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +12 -8
- data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.rb +9 -2
- data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +35 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default.html.erb +8 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default.jsx +19 -1
- data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_distribution_bar/distribution_bar.rb +2 -2
- data/app/pb_kits/playbook/pb_filter/filter.rb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex.jsx +6 -1
- data/app/pb_kits/playbook/pb_flex/flex.rb +4 -4
- data/app/pb_kits/playbook/pb_form/form.rb +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +12 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +19 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.html.erb +13 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.jsx +25 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb +4 -5
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx +2 -6
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +5 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +0 -1
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +6 -2
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.jsx +14 -11
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +18 -13
- data/app/pb_kits/playbook/pb_pill/_pill.jsx +1 -0
- data/app/pb_kits/playbook/pb_pill/pill.html.erb +1 -1
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.rb +2 -1
- data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +1 -1
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +10 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +61 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.html.erb +6 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx +16 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.html.erb +4 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.jsx +14 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +9 -2
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +7 -3
- data/app/pb_kits/playbook/pb_select/_select.jsx +5 -5
- data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.rb +1 -1
- data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +1 -1
- data/app/pb_kits/playbook/pb_stat_change/stat_change.rb +8 -12
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +83 -31
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +106 -0
- data/app/pb_kits/playbook/pb_text_input/add_on.html.erb +13 -0
- data/app/pb_kits/playbook/pb_text_input/add_on.rb +30 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on.html.erb +24 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on.jsx +82 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_custom.html.erb +1 -1
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.html.erb +5 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.jsx +22 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +7 -16
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +43 -3
- data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +2 -2
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +11 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +23 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +23 -11
- data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.jsx +17 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx +25 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.html.erb +36 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.jsx +43 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb +35 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx +44 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +8 -5
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +18 -2
- data/app/pb_kits/playbook/pb_user_badge/user_badge.rb +1 -1
- data/lib/playbook/forms/builder/action_area.rb +2 -2
- data/lib/playbook/forms/builder/collection_select_field.rb +2 -2
- data/lib/playbook/forms/builder/select_field.rb +1 -1
- data/lib/playbook/kit_resolver.rb +1 -1
- data/lib/playbook/markdown/template_handler.rb +4 -2
- data/lib/playbook/pb_doc_helper.rb +4 -2
- data/lib/playbook/props.rb +2 -4
- data/lib/playbook/props/base.rb +1 -2
- data/lib/playbook/props/nested_props.rb +23 -0
- data/lib/playbook/version.rb +2 -1
- metadata +58 -24
@@ -7,6 +7,8 @@ examples:
|
|
7
7
|
- rich_text_editor_focus: Focus
|
8
8
|
- rich_text_editor_sticky: Sticky
|
9
9
|
- rich_text_editor_templates: Templates
|
10
|
+
- rich_text_editor_toolbar_bottom: Toolbar Bottom
|
11
|
+
- rich_text_editor_inline: Inline
|
10
12
|
- rich_text_editor_preview: Preview
|
11
13
|
|
12
14
|
react:
|
@@ -16,4 +18,6 @@ examples:
|
|
16
18
|
- rich_text_editor_focus: Focus
|
17
19
|
- rich_text_editor_sticky: Sticky
|
18
20
|
- rich_text_editor_templates: Templates
|
21
|
+
- rich_text_editor_toolbar_bottom: Toolbar Bottom
|
22
|
+
- rich_text_editor_inline: Inline
|
19
23
|
- rich_text_editor_preview: Preview
|
@@ -4,4 +4,6 @@ export { default as RichTextEditorAttributes } from './_rich_text_editor_attribu
|
|
4
4
|
export { default as RichTextEditorFocus } from './_rich_text_editor_focus.jsx'
|
5
5
|
export { default as RichTextEditorSticky } from './_rich_text_editor_sticky.jsx'
|
6
6
|
export { default as RichTextEditorTemplates } from './_rich_text_editor_templates.jsx'
|
7
|
+
export { default as RichTextEditorToolbarBottom } from './_rich_text_editor_toolbar_bottom.jsx'
|
8
|
+
export { default as RichTextEditorInline } from './_rich_text_editor_inline.jsx'
|
7
9
|
export { default as RichTextEditorPreview } from './_rich_text_editor_preview.jsx'
|
@@ -6,11 +6,16 @@ module Playbook
|
|
6
6
|
prop :focus, type: Playbook::Props::Boolean,
|
7
7
|
default: false
|
8
8
|
|
9
|
+
prop :inline, type: Playbook::Props::Boolean,
|
10
|
+
default: false
|
11
|
+
|
9
12
|
prop :simple, type: Playbook::Props::Boolean,
|
10
13
|
default: false
|
11
14
|
|
12
15
|
prop :sticky, type: Playbook::Props::Boolean,
|
13
|
-
|
16
|
+
default: false
|
17
|
+
prop :toolbar_bottom, type: Playbook::Props::Boolean,
|
18
|
+
default: false
|
14
19
|
|
15
20
|
prop :value
|
16
21
|
prop :template
|
@@ -35,13 +40,15 @@ module Playbook
|
|
35
40
|
def rich_text_options
|
36
41
|
{
|
37
42
|
id: id,
|
43
|
+
inline: inline,
|
38
44
|
className: classname,
|
39
45
|
focus: focus,
|
40
46
|
simple: simple,
|
41
47
|
sticky: sticky,
|
48
|
+
toolbarBottom: toolbar_bottom,
|
42
49
|
value: value,
|
43
50
|
template: template,
|
44
|
-
placeholder: placeholder
|
51
|
+
placeholder: placeholder,
|
45
52
|
}
|
46
53
|
end
|
47
54
|
end
|
@@ -38,9 +38,13 @@ const SectionSeparator = (props: SectionSeparatorProps) => {
|
|
38
38
|
className={classes}
|
39
39
|
id={id}
|
40
40
|
>
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
|
42
|
+
<If condition={text}>
|
43
|
+
<span>
|
44
|
+
<Caption text={text} />
|
45
|
+
</span>
|
46
|
+
</If>
|
47
|
+
|
44
48
|
</div>
|
45
49
|
)
|
46
50
|
}
|
@@ -126,17 +126,17 @@ const Select = ({
|
|
126
126
|
{optionsList}
|
127
127
|
</select>
|
128
128
|
</If>
|
129
|
+
<Icon
|
130
|
+
className="pb_select_kit_caret"
|
131
|
+
fixedWidth
|
132
|
+
icon="angle-down"
|
133
|
+
/>
|
129
134
|
<If condition={error}>
|
130
135
|
<Body
|
131
136
|
status="negative"
|
132
137
|
text={error}
|
133
138
|
/>
|
134
139
|
</If>
|
135
|
-
<Icon
|
136
|
-
className="pb_select_kit_caret"
|
137
|
-
fixedWidth
|
138
|
-
icon="angle-down"
|
139
|
-
/>
|
140
140
|
</label>
|
141
141
|
</div>
|
142
142
|
)
|
@@ -21,18 +21,14 @@ module Playbook
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def returned_icon
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
else
|
33
|
-
false
|
34
|
-
end
|
35
|
-
end
|
24
|
+
icon || case change
|
25
|
+
when "increase"
|
26
|
+
"arrow-up"
|
27
|
+
when "decrease"
|
28
|
+
"arrow-down"
|
29
|
+
else
|
30
|
+
false
|
31
|
+
end
|
36
32
|
end
|
37
33
|
|
38
34
|
def classname
|
@@ -1,13 +1,10 @@
|
|
1
1
|
/* @flow */
|
2
2
|
import React, { forwardRef } from 'react'
|
3
3
|
import classnames from 'classnames'
|
4
|
-
import { Body, Caption } from '../'
|
4
|
+
import { Body, Caption, Card, Flex, Icon } from '../'
|
5
5
|
import { globalProps } from '../utilities/globalProps.js'
|
6
6
|
|
7
|
-
import {
|
8
|
-
buildAriaProps,
|
9
|
-
buildDataProps,
|
10
|
-
} from '../utilities/props'
|
7
|
+
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
11
8
|
|
12
9
|
type TextInputProps = {
|
13
10
|
aria?: object,
|
@@ -17,6 +14,7 @@ type TextInputProps = {
|
|
17
14
|
disabled?: boolean,
|
18
15
|
error?: string,
|
19
16
|
id?: string,
|
17
|
+
inline?: boolean,
|
20
18
|
name: string,
|
21
19
|
label: string,
|
22
20
|
onChange: (String) => void,
|
@@ -25,12 +23,14 @@ type TextInputProps = {
|
|
25
23
|
type: string,
|
26
24
|
value: string | number,
|
27
25
|
children: Node,
|
26
|
+
addOn?: {
|
27
|
+
icon?: string,
|
28
|
+
alignment?: "right" | "left",
|
29
|
+
border?: boolean,
|
30
|
+
},
|
28
31
|
}
|
29
32
|
|
30
|
-
const TextInput = (
|
31
|
-
props: TextInputProps,
|
32
|
-
ref: React.ElementRef<"input">
|
33
|
-
) => {
|
33
|
+
const TextInput = (props: TextInputProps, ref: React.ElementRef<"input">) => {
|
34
34
|
const {
|
35
35
|
aria = {},
|
36
36
|
className,
|
@@ -39,6 +39,7 @@ const TextInput = (
|
|
39
39
|
disabled,
|
40
40
|
error,
|
41
41
|
id,
|
42
|
+
inline = false,
|
42
43
|
name,
|
43
44
|
label,
|
44
45
|
onChange = () => {},
|
@@ -47,16 +48,79 @@ const TextInput = (
|
|
47
48
|
type = 'text',
|
48
49
|
value = '',
|
49
50
|
children = null,
|
51
|
+
addOn = { icon: null, alignment: 'right', border: true },
|
50
52
|
} = props
|
51
53
|
|
52
54
|
const ariaProps = buildAriaProps(aria)
|
53
55
|
const dataProps = buildDataProps(data)
|
56
|
+
|
57
|
+
const { alignment, border, icon } = addOn
|
58
|
+
const addOnAlignment = alignment === 'left' ? 'left' : 'right'
|
59
|
+
const borderToChange = addOnAlignment === 'left' ? 'right' : 'left'
|
60
|
+
const borderToggle = border === false ? 'off' : 'on'
|
61
|
+
const borderCss = `border_${borderToChange}_${borderToggle}`
|
62
|
+
|
63
|
+
const shouldShowAddOn = icon !== null
|
64
|
+
const addOnCss = shouldShowAddOn ? 'text_input_wrapper_add_on' : null
|
65
|
+
const addOnDarkModeCardCss = (shouldShowAddOn && dark) ? 'add-on-card-dark' : null
|
54
66
|
const css = classnames([
|
55
67
|
'pb_text_input_kit',
|
68
|
+
inline ? 'inline' : null,
|
56
69
|
error ? 'error' : null,
|
57
70
|
globalProps(props),
|
58
71
|
className,
|
59
72
|
])
|
73
|
+
const addOnIcon = (
|
74
|
+
<Icon
|
75
|
+
className="add-on-icon"
|
76
|
+
dark={dark}
|
77
|
+
fixedWidth={false}
|
78
|
+
icon={icon}
|
79
|
+
/>
|
80
|
+
)
|
81
|
+
const textInput = (
|
82
|
+
<input
|
83
|
+
{...props}
|
84
|
+
className="text_input"
|
85
|
+
disabled={disabled}
|
86
|
+
id={id}
|
87
|
+
name={name}
|
88
|
+
onChange={onChange}
|
89
|
+
placeholder={placeholder}
|
90
|
+
ref={ref}
|
91
|
+
required={required}
|
92
|
+
type={type}
|
93
|
+
value={value}
|
94
|
+
/>
|
95
|
+
)
|
96
|
+
|
97
|
+
const addOnInput = (
|
98
|
+
<React.Fragment>
|
99
|
+
<Flex
|
100
|
+
className={`add-on-${addOnAlignment} ${borderCss}`}
|
101
|
+
inline="flex-container"
|
102
|
+
vertical="center"
|
103
|
+
>
|
104
|
+
<If condition={addOnAlignment == 'left'}>
|
105
|
+
<Card
|
106
|
+
className={`${addOnDarkModeCardCss} add-on-card card-left-aligned`}
|
107
|
+
dark={dark}
|
108
|
+
>
|
109
|
+
{addOnIcon}
|
110
|
+
</Card>
|
111
|
+
{textInput}
|
112
|
+
<Else />
|
113
|
+
{textInput}
|
114
|
+
<Card
|
115
|
+
className={`${addOnDarkModeCardCss} add-on-card card-right-aligned`}
|
116
|
+
dark={dark}
|
117
|
+
>
|
118
|
+
{addOnIcon}
|
119
|
+
</Card>
|
120
|
+
</If>
|
121
|
+
</Flex>
|
122
|
+
</React.Fragment>
|
123
|
+
)
|
60
124
|
|
61
125
|
return (
|
62
126
|
<div
|
@@ -69,29 +133,17 @@ const TextInput = (
|
|
69
133
|
dark={dark}
|
70
134
|
text={label}
|
71
135
|
/>
|
72
|
-
<div className=
|
73
|
-
<
|
74
|
-
{children}
|
75
|
-
<
|
76
|
-
<
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
onChange={onChange}
|
83
|
-
placeholder={placeholder}
|
84
|
-
ref={ref}
|
85
|
-
required={required}
|
86
|
-
type={type}
|
87
|
-
value={value}
|
136
|
+
<div className={`${addOnCss} text_input_wrapper`}>
|
137
|
+
<Choose>
|
138
|
+
<When condition={children}>{children}</When>
|
139
|
+
<When condition={shouldShowAddOn}>{addOnInput}</When>
|
140
|
+
<Otherwise>{textInput}</Otherwise>
|
141
|
+
</Choose>
|
142
|
+
<If condition={error}>
|
143
|
+
<Body
|
144
|
+
status="negative"
|
145
|
+
text={error}
|
88
146
|
/>
|
89
|
-
<If condition={error}>
|
90
|
-
<Body
|
91
|
-
status="negative"
|
92
|
-
text={error}
|
93
|
-
/>
|
94
|
-
</If>
|
95
147
|
</If>
|
96
148
|
</div>
|
97
149
|
</div>
|
@@ -36,6 +36,16 @@
|
|
36
36
|
}
|
37
37
|
}
|
38
38
|
&.dark {
|
39
|
+
.add_on_left {
|
40
|
+
.text_input {
|
41
|
+
border-left: 0;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
.add_on_right {
|
45
|
+
.text_input {
|
46
|
+
border-right: 0;
|
47
|
+
}
|
48
|
+
}
|
39
49
|
.text_input_wrapper {
|
40
50
|
margin-bottom: 1rem;
|
41
51
|
input::placeholder,
|
@@ -79,4 +89,100 @@
|
|
79
89
|
}
|
80
90
|
}
|
81
91
|
}
|
92
|
+
&.inline {
|
93
|
+
&:not(:hover) {
|
94
|
+
.text_input_wrapper input:not(:focus) {
|
95
|
+
background-color: transparent;
|
96
|
+
border-color: transparent;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
.text_input_wrapper_add_on {
|
103
|
+
& > [class^=pb_text_input_kit]:not(:last-child) {
|
104
|
+
.text_input_wrapper_add_on input, [class^=pb_text_input_kit] .text_input_wrapper_add_on .text_input {
|
105
|
+
border-bottom-right-radius: 0;
|
106
|
+
border-top-right-radius: 0;
|
107
|
+
border-right-width: 0;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
.section-separator span {
|
111
|
+
padding: 0;
|
112
|
+
}
|
113
|
+
|
114
|
+
.add-on {
|
115
|
+
&-card {
|
116
|
+
height: 45px;
|
117
|
+
margin: 0;
|
118
|
+
padding: 0 !important;
|
119
|
+
align-items: center;
|
120
|
+
justify-content: center;
|
121
|
+
width: 45px;
|
122
|
+
}
|
123
|
+
&-icon {
|
124
|
+
color: $text_lt_lighter;
|
125
|
+
}
|
126
|
+
&-card-dark {
|
127
|
+
background-color: $bg-dark;
|
128
|
+
}
|
129
|
+
&-left {
|
130
|
+
.text_input {
|
131
|
+
border-top-left-radius: 0 !important;
|
132
|
+
border-bottom-left-radius: 0 !important;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
&-right {
|
137
|
+
.text_input{
|
138
|
+
border-top-right-radius: 0 !important;
|
139
|
+
border-bottom-right-radius: 0 !important;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
.text_input:focus ~ .add-on-card-dark {
|
144
|
+
background-color: $focus_input_dark;
|
145
|
+
border-width: 0px;
|
146
|
+
}
|
147
|
+
|
148
|
+
.card-left-aligned {
|
149
|
+
border-top-right-radius: 0 !important;
|
150
|
+
border-bottom-right-radius: 0 !important;
|
151
|
+
}
|
152
|
+
|
153
|
+
.card-right-aligned {
|
154
|
+
border-top-left-radius: 0 !important;
|
155
|
+
border-bottom-left-radius: 0 !important;
|
156
|
+
}
|
157
|
+
|
158
|
+
.border {
|
159
|
+
&_right_off {
|
160
|
+
.card-left-aligned {
|
161
|
+
border-right: 0;
|
162
|
+
}
|
163
|
+
.text_input {
|
164
|
+
border-left: 0 !important;
|
165
|
+
padding-left: 0 !important;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
&_left_on {
|
169
|
+
.card-right-aligned {
|
170
|
+
border-left: 0;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
&_right_on {
|
174
|
+
.card-left-aligned {
|
175
|
+
border-right: 0;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
&_left_off {
|
179
|
+
.card-right-aligned {
|
180
|
+
border-left: 0;
|
181
|
+
}
|
182
|
+
.text_input {
|
183
|
+
border-right: 0 !important;
|
184
|
+
padding-right: 0 !important;
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
82
188
|
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= pb_rails("flex", props: { classname: "add-on-#{alignment} #{border_css}", vertical: "center"}) do %>
|
2
|
+
<% if left_aligned? %>
|
3
|
+
<%= pb_rails("card", props: {classname: "#{dark_mode_css} add-on-card card-left-aligned", dark: dark}) do %>
|
4
|
+
<%= pb_rails("icon", props: { icon: icon, classname: "add-on-icon", fixed_width: false, dark: dark }) %>
|
5
|
+
<% end %>
|
6
|
+
<%= content %>
|
7
|
+
<% else %>
|
8
|
+
<%= content %>
|
9
|
+
<%= pb_rails("card", props: {classname: "#{dark_mode_css} add-on-card card-right-aligned", dark: dark}) do %>
|
10
|
+
<%= pb_rails("icon", props: { icon: icon, classname: "add-on-icon", fixed_width: false, dark: dark }) %>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|