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.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/data/menu.yml +26 -22
  4. data/app/pb_kits/playbook/index.js +1 -0
  5. data/app/pb_kits/playbook/pb_background/background.rb +0 -1
  6. data/app/pb_kits/playbook/pb_badge/_badge.jsx +26 -1
  7. data/app/pb_kits/playbook/pb_badge/_badge.scss +1 -1
  8. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx +51 -0
  9. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.jsx +49 -0
  10. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +55 -0
  11. data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.html.erb +9 -0
  12. data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.rb +12 -0
  13. data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.html.erb +7 -0
  14. data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.rb +11 -0
  15. data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.test.js +35 -0
  16. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.html.erb +17 -0
  17. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +56 -0
  18. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_description.md +1 -0
  19. data/app/pb_kits/playbook/pb_bread_crumbs/docs/example.yml +7 -0
  20. data/app/pb_kits/playbook/pb_bread_crumbs/docs/index.js +1 -0
  21. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  22. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +9 -10
  23. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +4 -2
  24. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +6 -1
  25. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +3 -0
  26. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +45 -11
  27. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +17 -6
  28. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.rb +18 -13
  29. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold.html.erb +5 -0
  30. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold.jsx +38 -0
  31. data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +3 -1
  32. data/app/pb_kits/playbook/pb_date_stacked/docs/index.js +1 -0
  33. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.jsx +32 -16
  34. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +23 -4
  35. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +12 -8
  36. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.rb +9 -2
  37. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +35 -0
  38. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default.html.erb +8 -1
  39. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default.jsx +19 -1
  40. data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +1 -1
  41. data/app/pb_kits/playbook/pb_distribution_bar/distribution_bar.rb +2 -2
  42. data/app/pb_kits/playbook/pb_filter/filter.rb +1 -1
  43. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -1
  44. data/app/pb_kits/playbook/pb_flex/_flex.jsx +6 -1
  45. data/app/pb_kits/playbook/pb_flex/flex.rb +4 -4
  46. data/app/pb_kits/playbook/pb_form/form.rb +1 -1
  47. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +12 -2
  48. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +19 -0
  49. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.html.erb +13 -0
  50. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.jsx +25 -0
  51. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb +4 -5
  52. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx +2 -6
  53. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -0
  54. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
  55. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
  56. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +5 -0
  57. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +0 -1
  58. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +6 -2
  59. data/app/pb_kits/playbook/pb_passphrase/_passphrase.jsx +14 -11
  60. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +18 -13
  61. data/app/pb_kits/playbook/pb_pill/_pill.jsx +1 -0
  62. data/app/pb_kits/playbook/pb_pill/pill.html.erb +1 -1
  63. data/app/pb_kits/playbook/pb_progress_pills/progress_pills.rb +2 -1
  64. data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +1 -1
  65. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +1 -1
  66. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +10 -0
  67. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +61 -0
  68. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.html.erb +6 -0
  69. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx +16 -0
  70. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.html.erb +4 -0
  71. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.jsx +14 -0
  72. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +4 -0
  73. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -0
  74. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +9 -2
  75. data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +7 -3
  76. data/app/pb_kits/playbook/pb_select/_select.jsx +5 -5
  77. data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.rb +1 -1
  78. data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +1 -1
  79. data/app/pb_kits/playbook/pb_stat_change/stat_change.rb +8 -12
  80. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +83 -31
  81. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +106 -0
  82. data/app/pb_kits/playbook/pb_text_input/add_on.html.erb +13 -0
  83. data/app/pb_kits/playbook/pb_text_input/add_on.rb +30 -0
  84. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on.html.erb +24 -0
  85. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on.jsx +82 -0
  86. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_custom.html.erb +1 -1
  87. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.html.erb +5 -0
  88. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.jsx +22 -0
  89. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +4 -0
  90. data/app/pb_kits/playbook/pb_text_input/docs/index.js +2 -0
  91. data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +7 -16
  92. data/app/pb_kits/playbook/pb_text_input/text_input.rb +43 -3
  93. data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +2 -2
  94. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -1
  95. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +11 -2
  96. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +23 -0
  97. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +23 -11
  98. data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.jsx +17 -4
  99. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx +25 -0
  100. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.html.erb +36 -0
  101. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.jsx +43 -0
  102. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb +35 -0
  103. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx +44 -0
  104. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +5 -0
  105. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +8 -5
  106. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -1
  107. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +18 -2
  108. data/app/pb_kits/playbook/pb_user_badge/user_badge.rb +1 -1
  109. data/lib/playbook/forms/builder/action_area.rb +2 -2
  110. data/lib/playbook/forms/builder/collection_select_field.rb +2 -2
  111. data/lib/playbook/forms/builder/select_field.rb +1 -1
  112. data/lib/playbook/kit_resolver.rb +1 -1
  113. data/lib/playbook/markdown/template_handler.rb +4 -2
  114. data/lib/playbook/pb_doc_helper.rb +4 -2
  115. data/lib/playbook/props.rb +2 -4
  116. data/lib/playbook/props/base.rb +1 -2
  117. data/lib/playbook/props/nested_props.rb +23 -0
  118. data/lib/playbook/version.rb +2 -1
  119. 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
- default: false
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
- <span>
42
- <Caption text={text} />
43
- </span>
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
  )
@@ -22,7 +22,7 @@ module Playbook
22
22
  prop :value
23
23
 
24
24
  prop :input_options, type: Playbook::Props::Hash,
25
- default: {}
25
+ default: {}
26
26
 
27
27
  def classname
28
28
  generate_classname("pb_selectable_card_icon_kit", checked_class, enabled_disabled_class)
@@ -20,7 +20,7 @@ module Playbook
20
20
  prop :value
21
21
 
22
22
  prop :input_options, type: Playbook::Props::Hash,
23
- default: {}
23
+ default: {}
24
24
 
25
25
  # Conditional rendering for input field
26
26
  prop :inputs, type: Playbook::Props::String,
@@ -21,18 +21,14 @@ module Playbook
21
21
  end
22
22
 
23
23
  def returned_icon
24
- if icon
25
- icon
26
- else
27
- case change
28
- when "increase"
29
- "arrow-up"
30
- when "decrease"
31
- "arrow-down"
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="text_input_wrapper">
73
- <If condition={children}>
74
- {children}
75
- <Else />
76
- <input
77
- {...props}
78
- className="text_input"
79
- disabled={disabled}
80
- id={id}
81
- name={name}
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 %>