playbook_ui 16.5.0.pre.alpha.RTEPOC15779 → 16.5.0.pre.alpha.play289915580
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -33
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +0 -35
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +13 -219
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/kit.schema.json +9 -18
- data/app/pb_kits/playbook/pb_select/select.rb +2 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +4 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_typeahead/kit.schema.json +2 -4
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -4
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +58 -0
- data/dist/chunks/{_pb_line_graph-EzcacMw_.js → _pb_line_graph-D6s5rymw.js} +1 -1
- data/dist/chunks/{_typeahead-BYUXg9ZT.js → _typeahead-BNp_YiTh.js} +1 -1
- data/dist/chunks/{globalProps-6Hsm3bJX.js → globalProps-Ds_6HBhX.js} +1 -1
- data/dist/chunks/{lib-o4u12zAw.js → lib-BaO72ugL.js} +1 -1
- data/dist/chunks/vendor.js +2 -2
- data/dist/menu.yml +1 -0
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +7 -16
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dialog_submission.jsx +0 -62
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dialog_submission.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.html.erb +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.md +0 -16
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.html.erb +0 -9
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.md +0 -12
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +0 -381
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +0 -63
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.html.erb +0 -29
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.md +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56b26d361d1dbc2ac5256277d85a4fea2b3ab9b7a745a8f62085de16a976c716
|
|
4
|
+
data.tar.gz: 250f0d721fda4f62be3a744f5daf32c5a19c147fba43c5383e66eedab365c59b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bfdbb4f06db7e9d198fa81bbf6418e18d285810b8cc8f329b431d91d1e8d723def6cb224a35d8b862a9b1f962a296de508fb34813e8db36a5932e37024949c49
|
|
7
|
+
data.tar.gz: 783aed7a52d7c518afa0aa18549d8c1faf4129f774a0744dd55c1e6b02785be8c422015164986847da7c26234e7507e701ba1f6ca192ac826c03083e17d32583
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<% header_row.each_with_index do |cell, cell_index| %>
|
|
8
8
|
<% header_component = object.header_component_info(cell, cell_index, row_index) %>
|
|
9
9
|
<%= pb_rails(header_component[:name], props: header_component[:props]) do %>
|
|
10
|
-
<%= pb_rails("flex", props: { align: "center", justify:
|
|
10
|
+
<%= pb_rails("flex", props: { align: "center", justify: cell_index.zero? ? "start" : row_index === header_rows.size - 1 ? "end" : "center", text_align: (cell[:header_alignment] || "end") }) do %>
|
|
11
11
|
<% if cell_index.zero? && row_index === header_rows.size - 1 %>
|
|
12
12
|
<% if object.selectable_rows && object.enable_toggle_expansion != "none" %>
|
|
13
13
|
<%= pb_rails("flex/flex_item", props: { padding_right: "xs" }) do %>
|
|
@@ -192,19 +192,6 @@ module Playbook
|
|
|
192
192
|
{ name: component_name, props: component_props }
|
|
193
193
|
end
|
|
194
194
|
|
|
195
|
-
# Flex justify for header cells: column_styling header_alignment when present (otherwisedefault by column/row index)
|
|
196
|
-
def header_flex_justify(cell, cell_index, row_index)
|
|
197
|
-
ha = cell[:header_alignment]
|
|
198
|
-
return header_alignment_to_justify(ha) if ha.present?
|
|
199
|
-
|
|
200
|
-
default_header_flex_justify(cell_index, row_index)
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
# Flex text_align from column_styling header_alignment (default is end)
|
|
204
|
-
def header_flex_text_align(cell)
|
|
205
|
-
(cell[:header_alignment].presence || "end").to_s
|
|
206
|
-
end
|
|
207
|
-
|
|
208
195
|
private
|
|
209
196
|
|
|
210
197
|
# Find the original column definition for a cell
|
|
@@ -364,26 +351,6 @@ module Playbook
|
|
|
364
351
|
row[:children] || row["children"]
|
|
365
352
|
end
|
|
366
353
|
end
|
|
367
|
-
|
|
368
|
-
# 2 header alignment helper methods
|
|
369
|
-
def header_alignment_to_justify(header_alignment)
|
|
370
|
-
case header_alignment.to_s
|
|
371
|
-
when "left" then "start"
|
|
372
|
-
when "center" then "center"
|
|
373
|
-
when "right" then "end"
|
|
374
|
-
else "end"
|
|
375
|
-
end
|
|
376
|
-
end
|
|
377
|
-
|
|
378
|
-
def default_header_flex_justify(cell_index, row_index)
|
|
379
|
-
if cell_index.zero?
|
|
380
|
-
"start"
|
|
381
|
-
elsif row_index == header_rows.size - 1
|
|
382
|
-
"end"
|
|
383
|
-
else
|
|
384
|
-
"center"
|
|
385
|
-
end
|
|
386
|
-
end
|
|
387
354
|
end
|
|
388
355
|
end
|
|
389
356
|
end
|
|
@@ -612,41 +612,6 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
|
|
|
612
612
|
}
|
|
613
613
|
// === End of Automatic Sync Logic ===
|
|
614
614
|
|
|
615
|
-
// Label click toggles calendar: stop pointer bubbling to document, then toggle (avoids flatpickr close + input-focus reopen).
|
|
616
|
-
const datePickerLabel = document.querySelector(`label[for="${pickerId}"]`)
|
|
617
|
-
if (datePickerLabel) {
|
|
618
|
-
type LabelHandlerRefs = { stopPointer?: (e: Event) => void, click?: (e: MouseEvent) => void }
|
|
619
|
-
const labelWithRefs = datePickerLabel as HTMLElement & { _pbDatePickerLabelHandlers?: LabelHandlerRefs }
|
|
620
|
-
const prev = labelWithRefs._pbDatePickerLabelHandlers
|
|
621
|
-
if (prev?.stopPointer) {
|
|
622
|
-
datePickerLabel.removeEventListener('mousedown', prev.stopPointer)
|
|
623
|
-
datePickerLabel.removeEventListener('touchstart', prev.stopPointer)
|
|
624
|
-
}
|
|
625
|
-
if (prev?.click) {
|
|
626
|
-
datePickerLabel.removeEventListener('click', prev.click)
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
const stopPointerForFlatpickrDocClose = (e: Event) => {
|
|
630
|
-
e.stopPropagation()
|
|
631
|
-
}
|
|
632
|
-
const onDatePickerLabelClick = (e: MouseEvent) => {
|
|
633
|
-
e.preventDefault()
|
|
634
|
-
e.stopPropagation()
|
|
635
|
-
if (picker.input.disabled) return
|
|
636
|
-
picker.toggle()
|
|
637
|
-
if (picker.isOpen) {
|
|
638
|
-
picker.input.focus()
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
datePickerLabel.addEventListener('mousedown', stopPointerForFlatpickrDocClose)
|
|
642
|
-
datePickerLabel.addEventListener('touchstart', stopPointerForFlatpickrDocClose, { passive: true })
|
|
643
|
-
datePickerLabel.addEventListener('click', onDatePickerLabelClick)
|
|
644
|
-
|
|
645
|
-
labelWithRefs._pbDatePickerLabelHandlers = {
|
|
646
|
-
stopPointer: stopPointerForFlatpickrDocClose,
|
|
647
|
-
click: onDatePickerLabelClick,
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
615
|
|
|
651
616
|
// Adding dropdown icons to year and month select
|
|
652
617
|
dropdown.insertAdjacentHTML('afterend', `<i class="year-dropdown-icon">${angleDown}</i>`)
|
|
@@ -29,4 +29,3 @@ export { default as DatePickerQuickPickDefaultDate } from './_date_picker_quick_
|
|
|
29
29
|
export { default as DatePickerRangePattern } from './_date_picker_range_pattern'
|
|
30
30
|
export { default as DatePickerAndDropdownRange } from './_date_picker_and_dropdown_range.jsx'
|
|
31
31
|
export { default as DatePickerRequiredIndicator } from "./_date_picker_required_indicator.jsx";
|
|
32
|
-
export { default as DatePickerDialogSubmission } from "./_date_picker_dialog_submission.jsx";
|
|
@@ -142,7 +142,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
|
142
142
|
// Determine if toolbar should be shown
|
|
143
143
|
const shouldShowToolbar = focus && advancedEditor ? showToolbarOnFocus : advancedEditorToolbar
|
|
144
144
|
|
|
145
|
-
const labelFor = advancedEditor ? fieldId : (id ? id : (inputOptions
|
|
145
|
+
const labelFor = advancedEditor ? fieldId : (id ? id : (inputOptions.id ? `${inputOptions.id}_trix` : undefined))
|
|
146
146
|
|
|
147
147
|
return (
|
|
148
148
|
<div
|
|
@@ -8,21 +8,7 @@
|
|
|
8
8
|
@import "../tokens/transition";
|
|
9
9
|
@import "previewer_mixin";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
// intrinsic width can force horizontal page/dialog scroll. Pin the kit to the parent width.
|
|
13
|
-
[data-pb-rte-tiptap="true"] {
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
display: block;
|
|
16
|
-
max-width: 100%;
|
|
17
|
-
min-width: 0;
|
|
18
|
-
width: 100%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.pb_rich_text_editor_kit {
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
max-width: 100%;
|
|
24
|
-
min-width: 0;
|
|
25
|
-
|
|
11
|
+
[class^="pb_rich_text_editor_kit"] {
|
|
26
12
|
&.inline {
|
|
27
13
|
.toolbar {
|
|
28
14
|
opacity: 0;
|
|
@@ -87,54 +73,18 @@
|
|
|
87
73
|
}
|
|
88
74
|
}
|
|
89
75
|
|
|
90
|
-
// Active state for toolbar (Rails kit uses pb_button_kit pb_button_link; override link variant when active)
|
|
91
|
-
.toolbar button.pb_button_kit.is-active {
|
|
92
|
-
color: $primary;
|
|
93
|
-
background-color: $bg_light;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
76
|
.pb_rich_text_editor_tiptap_toolbar_sticky {
|
|
97
77
|
position: sticky;
|
|
98
78
|
top: 0;
|
|
99
79
|
z-index: 10;
|
|
100
80
|
}
|
|
101
|
-
|
|
102
|
-
.rte-editor-wrap {
|
|
103
|
-
box-sizing: border-box;
|
|
104
|
-
max-width: 100%;
|
|
105
|
-
min-width: 0;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.pb_rich_text_editor_advanced_container {
|
|
109
|
-
max-width: 100%;
|
|
110
|
-
min-width: 0;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
81
|
.toolbar {
|
|
114
82
|
border-radius: $border_rad_heaviest $border_rad_heaviest 0 0;
|
|
115
83
|
border: 1px solid $input_border_default;
|
|
116
84
|
overflow-x: auto;
|
|
117
|
-
// Single horizontal row + scroll in narrow modals/sidebars (wrap used to stack controls vertically).
|
|
118
85
|
&_block {
|
|
119
|
-
align-items: center;
|
|
120
|
-
display: flex;
|
|
121
|
-
flex-wrap: nowrap;
|
|
122
86
|
gap: $space_xs;
|
|
123
|
-
min-width: 0;
|
|
124
|
-
overflow-x: auto;
|
|
125
|
-
-webkit-overflow-scrolling: touch;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Vertical section separators use ::before/::after with height: 100%. With
|
|
129
|
-
// align-items: center on .toolbar_block the kit’s cross size was 0, so the
|
|
130
|
-
// lines disappeared (master only had gap on .toolbar_block, default stretch).
|
|
131
|
-
.pb_section_separator_kit.pb_section_separator_vertical {
|
|
132
|
-
align-self: center;
|
|
133
|
-
flex-shrink: 0;
|
|
134
|
-
height: $space_xl;
|
|
135
87
|
}
|
|
136
|
-
|
|
137
|
-
// React ToolbarDropdown — match master (fixed width trigger; prod playbook.cloud).
|
|
138
88
|
.editor-dropdown-button {
|
|
139
89
|
background: transparent;
|
|
140
90
|
border: none;
|
|
@@ -143,125 +93,23 @@
|
|
|
143
93
|
font-weight: $light;
|
|
144
94
|
padding: ($space_xs - 1) 0px;
|
|
145
95
|
width: $space_xl * 3;
|
|
146
|
-
|
|
147
96
|
&:focus-visible {
|
|
148
97
|
box-shadow: unset;
|
|
149
98
|
}
|
|
150
99
|
}
|
|
151
|
-
|
|
152
|
-
// Rails TipTap toolbar: mirror React Toolbar.tsx — <Flex paddingX="sm" paddingY="xxs" justify="between">.
|
|
153
|
-
&.rte-rails-toolbar-layout--simple {
|
|
154
|
-
.rte-toolbar-left {
|
|
155
|
-
overflow-x: visible;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&.rte-rails-toolbar-layout {
|
|
160
|
-
max-width: 100%;
|
|
161
|
-
min-width: 0;
|
|
162
|
-
|
|
163
|
-
.rte-rails-toolbar-row {
|
|
164
|
-
align-items: center;
|
|
165
|
-
box-sizing: border-box;
|
|
166
|
-
column-gap: 0;
|
|
167
|
-
display: flex;
|
|
168
|
-
flex-wrap: nowrap;
|
|
169
|
-
justify-content: flex-start;
|
|
170
|
-
min-width: 0;
|
|
171
|
-
padding: $space_xxs $space_sm;
|
|
172
|
-
row-gap: 0;
|
|
173
|
-
width: 100%;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.rte-toolbar-left {
|
|
177
|
-
align-items: center;
|
|
178
|
-
display: flex;
|
|
179
|
-
flex: 1 1 auto;
|
|
180
|
-
flex-wrap: nowrap;
|
|
181
|
-
gap: $space_xs;
|
|
182
|
-
min-width: 0;
|
|
183
|
-
overflow-x: auto;
|
|
184
|
-
-webkit-overflow-scrolling: touch;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.rte-toolbar-right {
|
|
188
|
-
align-items: center;
|
|
189
|
-
display: flex;
|
|
190
|
-
flex-shrink: 0;
|
|
191
|
-
gap: $space_xs;
|
|
192
|
-
margin-left: auto;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// Align dropdown trigger with icon row (React wraps Popover + SectionSeparator in one flex line).
|
|
196
|
-
.pb_popover_reference_wrapper {
|
|
197
|
-
align-items: center;
|
|
198
|
-
display: inline-flex;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Override master’s fixed-width React trigger: Rails block-style label + icons needs flexible width.
|
|
202
|
-
.editor-dropdown-button {
|
|
203
|
-
justify-content: flex-start;
|
|
204
|
-
letter-spacing: normal;
|
|
205
|
-
line-height: 1;
|
|
206
|
-
max-width: 100%;
|
|
207
|
-
min-height: unset;
|
|
208
|
-
padding: ($space_xs - 1) $space_xs;
|
|
209
|
-
text-align: left;
|
|
210
|
-
width: auto;
|
|
211
|
-
|
|
212
|
-
.pb_button_content {
|
|
213
|
-
align-items: center;
|
|
214
|
-
display: inline-flex;
|
|
215
|
-
line-height: 1;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.pb_button_content > .pb_flex_kit {
|
|
219
|
-
align-items: center;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.rte-block-style-trigger-inner {
|
|
223
|
-
align-items: center;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.rte-block-style-trigger-icon,
|
|
227
|
-
.rte-block-style-chevron {
|
|
228
|
-
display: inline-flex;
|
|
229
|
-
flex-shrink: 0;
|
|
230
|
-
line-height: 0;
|
|
231
|
-
|
|
232
|
-
.pb_icon_kit {
|
|
233
|
-
align-items: center;
|
|
234
|
-
display: flex;
|
|
235
|
-
line-height: 0;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
svg {
|
|
239
|
-
display: block;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.rte-block-style-trigger-label {
|
|
244
|
-
align-items: center;
|
|
245
|
-
display: inline-flex;
|
|
246
|
-
line-height: 1.2;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
&:focus-visible {
|
|
250
|
-
box-shadow: unset;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
100
|
}
|
|
255
101
|
|
|
256
|
-
// TipTap content — match master (prod playbook React tab).
|
|
257
102
|
.ProseMirror {
|
|
258
103
|
background: $white;
|
|
259
104
|
border: 1px solid $input_border_default;
|
|
260
105
|
border-radius: $border_rad_heaviest;
|
|
261
106
|
height: 100%;
|
|
262
|
-
line-height: $lh_loose;
|
|
263
107
|
padding: 1rem 1.5rem 1.5rem 1.5rem;
|
|
108
|
+
line-height: $lh_loose;
|
|
264
109
|
@include transition_default;
|
|
110
|
+
:first-child {
|
|
111
|
+
margin-top: 0;
|
|
112
|
+
}
|
|
265
113
|
|
|
266
114
|
h4,
|
|
267
115
|
h5,
|
|
@@ -313,32 +161,9 @@
|
|
|
313
161
|
ul {
|
|
314
162
|
@include preview_tiptap_ul;
|
|
315
163
|
}
|
|
316
|
-
|
|
317
|
-
// After heading mixins: first block should not pick up extra top margin (wins over `p { margin-top: 1rem }`).
|
|
318
|
-
> :first-child {
|
|
319
|
-
margin-top: 0;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
// Toolbar + editor stack: toolbar keeps its border; editor has no top stroke (classic layout).
|
|
324
|
-
// Avoid relying on a wrapper-only frame — partial deploys then looked “borderless” because
|
|
325
|
-
// ProseMirror had been forced to border: none.
|
|
326
|
-
.pb_rich_text_editor_advanced_container.toolbar-active {
|
|
327
|
-
.ProseMirror {
|
|
328
|
-
border-top: none;
|
|
329
|
-
border-top-left-radius: initial;
|
|
330
|
-
border-top-right-radius: initial;
|
|
331
|
-
}
|
|
332
164
|
}
|
|
333
165
|
}
|
|
334
166
|
|
|
335
|
-
// Rails-only: outer kit sets `data-pb-rte-tiptap` — roomier padding + wrapping for vanilla TipTap in forms/dialogs.
|
|
336
|
-
[data-pb-rte-tiptap="true"] .pb_rich_text_editor_kit .ProseMirror {
|
|
337
|
-
overflow-wrap: anywhere;
|
|
338
|
-
padding: 1.25rem 1.5rem 1.5rem 1.5rem;
|
|
339
|
-
word-break: break-word;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
167
|
.pb_tiptap_toolbar_dropdown_list_item {
|
|
343
168
|
&.is-active,
|
|
344
169
|
&:active {
|
|
@@ -363,51 +188,20 @@
|
|
|
363
188
|
}
|
|
364
189
|
}
|
|
365
190
|
}
|
|
366
|
-
|
|
367
|
-
// Rails RTE: block-style menu uses Nav (popover) instead of React NavItem class hook.
|
|
368
|
-
.pb_rich_text_editor_kit .pb_popover_tooltip .pb_nav_list_item_link.is-active {
|
|
369
|
-
background-color: $bg_light;
|
|
370
|
-
border-radius: unset !important;
|
|
371
|
-
color: $primary;
|
|
372
|
-
|
|
373
|
-
.pb_nav_list_item_text,
|
|
374
|
-
.pb_nav_list_item_icon_left {
|
|
375
|
-
color: $primary !important;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.pb_rich_text_editor_kit .pb_popover_tooltip .pb_nav_list_kit_item:hover .pb_nav_list_item_link:not(.is-active) {
|
|
380
|
-
background-color: $neutral_subtle;
|
|
381
|
-
border-radius: unset !important;
|
|
382
|
-
|
|
383
|
-
.pb_nav_list_item_text,
|
|
384
|
-
.pb_nav_list_item_icon_left {
|
|
385
|
-
background-color: unset;
|
|
386
|
-
color: $text_lt_light !important;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
// No toolbar: ring the whole control.
|
|
391
|
-
.pb_rich_text_editor_advanced_container:not(.toolbar-active) {
|
|
191
|
+
.pb_rich_text_editor_advanced_container {
|
|
392
192
|
transition: box-shadow 0.3s ease-in-out, border-radius 0.3s ease-in-out;
|
|
393
193
|
&:focus-visible,
|
|
394
194
|
&:focus-within {
|
|
395
|
-
border-radius: $border_rad_heaviest;
|
|
396
|
-
box-shadow: 0 0 0 1px $input_border_state;
|
|
397
195
|
outline: unset;
|
|
196
|
+
box-shadow: 0 0 0 1px $input_border_state;
|
|
197
|
+
border-radius: $border_rad_heaviest;
|
|
398
198
|
transition: box-shadow 0.3s ease-in-out, border-radius 0.3s ease-in-out;
|
|
399
199
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
.toolbar {
|
|
406
|
-
border-color: $input_border_state;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.ProseMirror {
|
|
410
|
-
border-color: $input_border_state;
|
|
200
|
+
&.toolbar-active {
|
|
201
|
+
.ProseMirror {
|
|
202
|
+
border-top: none;
|
|
203
|
+
border-top-left-radius: initial;
|
|
204
|
+
border-top-right-radius: initial;
|
|
411
205
|
}
|
|
412
206
|
}
|
|
413
207
|
}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
"name": "RichTextEditor",
|
|
4
4
|
"description": "RichTextEditor component",
|
|
5
5
|
"platforms": [
|
|
6
|
-
"react"
|
|
7
|
-
"rails"
|
|
6
|
+
"react"
|
|
8
7
|
],
|
|
9
8
|
"props": {
|
|
10
9
|
"advancedEditor": {
|
|
@@ -34,8 +33,7 @@
|
|
|
34
33
|
"inputOptions": {
|
|
35
34
|
"type": "{ [key: string]: string | number | boolean | (() => void) }",
|
|
36
35
|
"platforms": [
|
|
37
|
-
"react"
|
|
38
|
-
"rails"
|
|
36
|
+
"react"
|
|
39
37
|
]
|
|
40
38
|
},
|
|
41
39
|
"inline": {
|
|
@@ -47,8 +45,7 @@
|
|
|
47
45
|
"label": {
|
|
48
46
|
"type": "string",
|
|
49
47
|
"platforms": [
|
|
50
|
-
"react"
|
|
51
|
-
"rails"
|
|
48
|
+
"react"
|
|
52
49
|
]
|
|
53
50
|
},
|
|
54
51
|
"extensions": {
|
|
@@ -72,8 +69,7 @@
|
|
|
72
69
|
"placeholder": {
|
|
73
70
|
"type": "string",
|
|
74
71
|
"platforms": [
|
|
75
|
-
"react"
|
|
76
|
-
"rails"
|
|
72
|
+
"react"
|
|
77
73
|
]
|
|
78
74
|
},
|
|
79
75
|
"inputHeight": {
|
|
@@ -101,18 +97,14 @@
|
|
|
101
97
|
"requiredIndicator": {
|
|
102
98
|
"type": "boolean",
|
|
103
99
|
"platforms": [
|
|
104
|
-
"react"
|
|
105
|
-
|
|
106
|
-
],
|
|
107
|
-
"default": false
|
|
100
|
+
"react"
|
|
101
|
+
]
|
|
108
102
|
},
|
|
109
103
|
"simple": {
|
|
110
104
|
"type": "boolean",
|
|
111
105
|
"platforms": [
|
|
112
|
-
"react"
|
|
113
|
-
|
|
114
|
-
],
|
|
115
|
-
"default": false
|
|
106
|
+
"react"
|
|
107
|
+
]
|
|
116
108
|
},
|
|
117
109
|
"sticky": {
|
|
118
110
|
"type": "boolean",
|
|
@@ -129,8 +121,7 @@
|
|
|
129
121
|
"value": {
|
|
130
122
|
"type": "string",
|
|
131
123
|
"platforms": [
|
|
132
|
-
"react"
|
|
133
|
-
"rails"
|
|
124
|
+
"react"
|
|
134
125
|
]
|
|
135
126
|
},
|
|
136
127
|
"TrixEditor": {
|
|
@@ -110,8 +110,8 @@ module Playbook
|
|
|
110
110
|
|
|
111
111
|
def data_attributes
|
|
112
112
|
data = attributes[:data] || {}
|
|
113
|
-
data
|
|
114
|
-
data
|
|
113
|
+
data.merge!("data-pb-select" => true)
|
|
114
|
+
data.merge!("data-validation-message" => validation_message) if validation_message.present?
|
|
115
115
|
data
|
|
116
116
|
end
|
|
117
117
|
|
|
@@ -516,18 +516,18 @@ const resolvedLoadOptions =
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
// Reset form submitted state when a selection is made (this is all for react rendered rails kit)
|
|
519
|
-
if (action === "select-option"
|
|
519
|
+
if (action === "select-option") {
|
|
520
520
|
setFormSubmitted(false)
|
|
521
521
|
// Mark that user has made a selection to disable default value focus behavior
|
|
522
522
|
setHasUserSelected(true)
|
|
523
523
|
}
|
|
524
524
|
|
|
525
|
-
// If a value is selected
|
|
526
|
-
if (
|
|
525
|
+
// If a value is selected and we're preserving input on blur, clear the input
|
|
526
|
+
if (action === "select-option" && preserveSearchInput) {
|
|
527
527
|
setInputValue("")
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
-
if (action === "select-option"
|
|
530
|
+
if (action === "select-option") {
|
|
531
531
|
if (selectProps.onMultiValueClick && option)
|
|
532
532
|
selectProps.onMultiValueClick(option)
|
|
533
533
|
const multiValueClearEvent = new CustomEvent(
|
|
@@ -11,7 +11,6 @@ examples:
|
|
|
11
11
|
- typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
|
|
12
12
|
- typeahead_inline: Inline
|
|
13
13
|
- typeahead_multi_kit: Multi Kit Options
|
|
14
|
-
- typeahead_createable: Createable
|
|
15
14
|
- typeahead_error_state: Error State
|
|
16
15
|
- typeahead_margin_bottom: Margin Bottom
|
|
17
16
|
- typeahead_with_pills_color: With Pills (Custom Color)
|
|
@@ -62,8 +62,6 @@ module Playbook
|
|
|
62
62
|
default: false
|
|
63
63
|
prop :required_indicator, type: Playbook::Props::Boolean,
|
|
64
64
|
default: false
|
|
65
|
-
prop :createable, type: Playbook::Props::Boolean,
|
|
66
|
-
default: false
|
|
67
65
|
def classname
|
|
68
66
|
default_margin_bottom = margin_bottom.present? ? "" : " mb_sm"
|
|
69
67
|
generate_classname("pb_typeahead_kit") + default_margin_bottom
|
|
@@ -85,7 +83,7 @@ module Playbook
|
|
|
85
83
|
end
|
|
86
84
|
|
|
87
85
|
def is_react?
|
|
88
|
-
pills || !is_multi || wrapped || input_display == "none"
|
|
86
|
+
pills || !is_multi || wrapped || input_display == "none"
|
|
89
87
|
end
|
|
90
88
|
|
|
91
89
|
def typeahead_react_options
|
|
@@ -117,7 +115,6 @@ module Playbook
|
|
|
117
115
|
clearOnContextChange: clear_on_context_change,
|
|
118
116
|
disabled: disabled,
|
|
119
117
|
preserveSearchInput: preserve_search_input,
|
|
120
|
-
createable: createable,
|
|
121
118
|
}
|
|
122
119
|
|
|
123
120
|
base_options[:getOptionLabel] = get_option_label if get_option_label.present?
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
"minHeight",
|
|
3
|
+
"maxHeight",
|
|
4
|
+
"height",
|
|
5
|
+
"left",
|
|
6
|
+
"bottom",
|
|
7
|
+
"right",
|
|
8
|
+
"top",
|
|
9
|
+
"hover",
|
|
10
|
+
"zIndex",
|
|
11
|
+
"verticalAlign",
|
|
12
|
+
"truncate",
|
|
13
|
+
"textAlign",
|
|
14
|
+
"shadow",
|
|
15
|
+
"position",
|
|
16
|
+
"paddingRight",
|
|
17
|
+
"paddingLeft",
|
|
18
|
+
"paddingTop",
|
|
19
|
+
"paddingBottom",
|
|
20
|
+
"paddingX",
|
|
21
|
+
"paddingY",
|
|
22
|
+
"padding",
|
|
23
|
+
"break",
|
|
24
|
+
"default",
|
|
25
|
+
"overflowX",
|
|
26
|
+
"overflowY",
|
|
27
|
+
"overflow",
|
|
28
|
+
"order",
|
|
29
|
+
"numberSpacing",
|
|
30
|
+
"rowGap",
|
|
31
|
+
"columnGap",
|
|
32
|
+
"gap",
|
|
33
|
+
"maxWidth",
|
|
34
|
+
"minWidth",
|
|
35
|
+
"width",
|
|
36
|
+
"marginRight",
|
|
37
|
+
"marginLeft",
|
|
38
|
+
"marginTop",
|
|
39
|
+
"marginBottom",
|
|
40
|
+
"marginX",
|
|
41
|
+
"marginY",
|
|
42
|
+
"margin",
|
|
43
|
+
"lineHeight",
|
|
44
|
+
"justifySelf",
|
|
45
|
+
"justifyContent",
|
|
46
|
+
"flexWrap",
|
|
47
|
+
"flexShrink",
|
|
48
|
+
"flexGrow",
|
|
49
|
+
"flexDirection",
|
|
50
|
+
"flex",
|
|
51
|
+
"display",
|
|
52
|
+
"dark",
|
|
53
|
+
"cursor",
|
|
54
|
+
"borderRadius",
|
|
55
|
+
"alignSelf",
|
|
56
|
+
"alignItems",
|
|
57
|
+
"alignContent"
|
|
58
|
+
];
|