playbook_ui 15.7.0.pre.alpha.PLAY2675dropdownquickpickcustomquickpickdates13330 → 15.7.0.pre.alpha.play2607setheightofeditor13370
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_dropdown/_dropdown.tsx +1 -13
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +1 -6
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +0 -121
- data/app/pb_kits/playbook/pb_dropdown/quickpick/index.ts +9 -85
- data/app/pb_kits/playbook/pb_dropdown/quickpick_helper.rb +2 -83
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +9 -7
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +3 -8
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +8 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +53 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.jsx +71 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.md +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_heigh.md +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.jsx +71 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +41 -3
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.html.erb +7 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.jsx +24 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.md +2 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_text_input/index.js +49 -8
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +5 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +53 -0
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +38 -2
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.html.erb +5 -0
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.jsx +24 -0
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.md +1 -0
- data/app/pb_kits/playbook/pb_textarea/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_textarea/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_textarea/index.ts +62 -5
- data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +1 -0
- data/app/pb_kits/playbook/pb_textarea/textarea.rb +8 -0
- data/app/pb_kits/playbook/pb_textarea/textarea.test.js +57 -2
- data/app/pb_kits/playbook/utilities/emojiMask.ts +42 -0
- data/dist/chunks/{_typeahead-Ckz1ce-2.js → _typeahead-D0GNUBXn.js} +2 -2
- data/dist/chunks/{lib-DxDBrGZX.js → lib-DxCgrqqG.js} +1 -1
- data/dist/chunks/vendor.js +3 -3
- 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/forms/builder/form_field_builder.rb +2 -0
- data/lib/playbook/version.rb +1 -1
- metadata +15 -8
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.jsx +0 -56
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.md +0 -10
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.html.erb +0 -64
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.md +0 -10
|
@@ -46,6 +46,8 @@ module Playbook
|
|
|
46
46
|
options[:data] = (options[:data] || {}).merge(message: validation[:message]) if validation[:message].present?
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
options[:data] = (options[:data] || {}).merge(pb_emoji_mask: true) if props.key?(:emoji_mask) && props[:emoji_mask]
|
|
50
|
+
|
|
49
51
|
input = super(name, **options, &block)
|
|
50
52
|
|
|
51
53
|
input_id = input[/\bid="([^"]+)"/, 1] || "#{@object_name}_#{name}"
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playbook_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 15.7.0.pre.alpha.
|
|
4
|
+
version: 15.7.0.pre.alpha.play2607setheightofeditor13370
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Power UX
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-01-
|
|
12
|
+
date: 2026-01-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: actionpack
|
|
@@ -1413,10 +1413,6 @@ files:
|
|
|
1413
1413
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx
|
|
1414
1414
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.jsx
|
|
1415
1415
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.md
|
|
1416
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.jsx
|
|
1417
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.md
|
|
1418
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.html.erb
|
|
1419
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.md
|
|
1420
1416
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb
|
|
1421
1417
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.jsx
|
|
1422
1418
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.md
|
|
@@ -2867,8 +2863,12 @@ files:
|
|
|
2867
2863
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.md
|
|
2868
2864
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.jsx
|
|
2869
2865
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.md
|
|
2866
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.jsx
|
|
2867
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.md
|
|
2870
2868
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.jsx
|
|
2871
2869
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.md
|
|
2870
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_heigh.md
|
|
2871
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.jsx
|
|
2872
2872
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_preview.jsx
|
|
2873
2873
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_simple.jsx
|
|
2874
2874
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.jsx
|
|
@@ -3372,6 +3372,9 @@ files:
|
|
|
3372
3372
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled.html.erb
|
|
3373
3373
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled.jsx
|
|
3374
3374
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled_swift.md
|
|
3375
|
+
- app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.html.erb
|
|
3376
|
+
- app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.jsx
|
|
3377
|
+
- app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_mask.md
|
|
3375
3378
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb
|
|
3376
3379
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx
|
|
3377
3380
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.md
|
|
@@ -3409,6 +3412,9 @@ files:
|
|
|
3409
3412
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_default.html.erb
|
|
3410
3413
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_default.jsx
|
|
3411
3414
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_default_swift.md
|
|
3415
|
+
- app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.html.erb
|
|
3416
|
+
- app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.jsx
|
|
3417
|
+
- app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.md
|
|
3412
3418
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb
|
|
3413
3419
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx
|
|
3414
3420
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_error.md
|
|
@@ -3906,6 +3912,7 @@ files:
|
|
|
3906
3912
|
- app/pb_kits/playbook/utilities/_vertical_align.scss
|
|
3907
3913
|
- app/pb_kits/playbook/utilities/_width.scss
|
|
3908
3914
|
- app/pb_kits/playbook/utilities/deprecated.ts
|
|
3915
|
+
- app/pb_kits/playbook/utilities/emojiMask.ts
|
|
3909
3916
|
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_content.scss
|
|
3910
3917
|
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_items.scss
|
|
3911
3918
|
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_self.scss
|
|
@@ -3945,9 +3952,9 @@ files:
|
|
|
3945
3952
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
|
3946
3953
|
- app/pb_kits/playbook/utilities/text.ts
|
|
3947
3954
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
|
3948
|
-
- dist/chunks/_typeahead-
|
|
3955
|
+
- dist/chunks/_typeahead-D0GNUBXn.js
|
|
3949
3956
|
- dist/chunks/lazysizes-B7xYodB-.js
|
|
3950
|
-
- dist/chunks/lib-
|
|
3957
|
+
- dist/chunks/lib-DxCgrqqG.js
|
|
3951
3958
|
- dist/chunks/vendor.js
|
|
3952
3959
|
- dist/menu.yml
|
|
3953
3960
|
- dist/playbook-rails-react-bindings.js
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import Dropdown from "../_dropdown"
|
|
3
|
-
|
|
4
|
-
const DropdownQuickpickCustom = (props) => (
|
|
5
|
-
<div>
|
|
6
|
-
<Dropdown
|
|
7
|
-
customQuickPickDates={{
|
|
8
|
-
dates: [
|
|
9
|
-
// Allow Playbook to handle the logic...
|
|
10
|
-
{
|
|
11
|
-
label: "Last 15 months",
|
|
12
|
-
value: {
|
|
13
|
-
timePeriod: "months",
|
|
14
|
-
amount: 15,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
// Or, be explicit with an exact date range for more control...
|
|
18
|
-
{
|
|
19
|
-
label: "First Week of June 2022",
|
|
20
|
-
value: ["06/01/2022", "06/07/2022"],
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
}}
|
|
24
|
-
label="Date Range"
|
|
25
|
-
marginBottom="sm"
|
|
26
|
-
onSelect={(selectedItem) => console.log(selectedItem)}
|
|
27
|
-
variant="quickpick"
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
<Dropdown
|
|
31
|
-
customQuickPickDates={{
|
|
32
|
-
dates: [
|
|
33
|
-
{
|
|
34
|
-
label: "Last 15 months",
|
|
35
|
-
value: {
|
|
36
|
-
timePeriod: "months",
|
|
37
|
-
amount: 15,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: "First Week of June 2022",
|
|
42
|
-
value: ["06/01/2022", "06/07/2022"],
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
override: false,
|
|
46
|
-
}}
|
|
47
|
-
label="Date Range - Append to Defaults"
|
|
48
|
-
onSelect={(selectedItem) => console.log(selectedItem)}
|
|
49
|
-
variant="quickpick"
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
export default DropdownQuickpickCustom
|
|
56
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
The `customQuickPickDates` prop allows for defining custom quick pick date options for the dropdown. The prop accepts an object with two properties: `dates` and `override`.
|
|
2
|
-
|
|
3
|
-
**The `dates` property** accepts an array of objects. Each object has `label` and `value` properties. The `label` is what will be displayed in the dropdown menu. The `value` property defines the date range that will be selected, and can be:
|
|
4
|
-
- An array of two date strings representing a specific range (e.g., `["06/01/2022", "06/07/2022"]`)
|
|
5
|
-
- An object with `timePeriod` and `amount` properties for dynamic date calculations:
|
|
6
|
-
- The `timePeriod` property accepts `"days"`, `"weeks"`, `"months"`, `"quarters"`, or `"years"`, representing past time periods calculated from today.
|
|
7
|
-
- The `amount` property accepts any number.
|
|
8
|
-
|
|
9
|
-
**The `override` property** is a boolean that controls whether custom dates replace or append to the default quick pick options. Default is `true` (replaces defaults). Set to `false` to append your custom dates to the default quick pick options.
|
|
10
|
-
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<%= pb_rails("dropdown", props: {
|
|
2
|
-
custom_quick_pick_dates: {
|
|
3
|
-
dates: [
|
|
4
|
-
# Allow Playbook to handle the logic...
|
|
5
|
-
{
|
|
6
|
-
label: "Last 15 months",
|
|
7
|
-
value: {
|
|
8
|
-
time_period: "months",
|
|
9
|
-
amount: 15
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
# Or, be explicit with an exact date range for more control...
|
|
13
|
-
{
|
|
14
|
-
label: "First Week of June 2022",
|
|
15
|
-
value: ["06/01/2022", "06/07/2022"]
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
id: "date-range-quickpick-custom",
|
|
20
|
-
label: "Date Range",
|
|
21
|
-
margin_bottom: "sm",
|
|
22
|
-
variant: "quickpick"
|
|
23
|
-
}) %>
|
|
24
|
-
|
|
25
|
-
<%= pb_rails("dropdown", props: {
|
|
26
|
-
custom_quick_pick_dates: {
|
|
27
|
-
override: false,
|
|
28
|
-
dates: [
|
|
29
|
-
{
|
|
30
|
-
label: "Last 15 months",
|
|
31
|
-
value: {
|
|
32
|
-
time_period: "months",
|
|
33
|
-
amount: 15
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: "First Week of June 2022",
|
|
38
|
-
value: ["06/01/2022", "06/07/2022"]
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
id: "date-range-quickpick-custom-append-to-defaults",
|
|
43
|
-
label: "Date Range - Append to Defaults",
|
|
44
|
-
variant: "quickpick"
|
|
45
|
-
}) %>
|
|
46
|
-
|
|
47
|
-
<script>
|
|
48
|
-
const dropdown1 = document.getElementById("date-range-quickpick-custom");
|
|
49
|
-
if (dropdown1) {
|
|
50
|
-
dropdown1.addEventListener("pb:dropdown:selected", (e) => {
|
|
51
|
-
const option = e.detail;
|
|
52
|
-
console.log("Selected option:", option);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const dropdown2 = document.getElementById("date-range-quickpick-custom-append-to-defaults");
|
|
57
|
-
if (dropdown2) {
|
|
58
|
-
dropdown2.addEventListener("pb:dropdown:selected", (e) => {
|
|
59
|
-
const option = e.detail;
|
|
60
|
-
console.log("Selected option:", option);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
</script>
|
|
64
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
The `custom_quick_pick_dates` prop allows for defining custom quick pick date options for the dropdown. The prop accepts an object with two properties: `dates` and `override`.
|
|
2
|
-
|
|
3
|
-
**The `dates` property** accepts an array of objects. Each object has `label` and `value` properties. The `label` is what will be displayed in the dropdown menu. The `value` property defines the date range that will be selected, and can be:
|
|
4
|
-
- An array of two date strings representing a specific range (e.g., `["06/01/2022", "06/07/2022"]`)
|
|
5
|
-
- An object with `time_period` and `amount` properties for dynamic date calculations:
|
|
6
|
-
- The `time_period` property accepts `"days"`, `"weeks"`, `"months"`, `"quarters"`, or `"years"`, representing past time periods calculated from today.
|
|
7
|
-
- The `amount` property accepts any number.
|
|
8
|
-
|
|
9
|
-
**The `override` property** is a boolean that controls whether custom dates replace or append to the default quick pick options. Default is `true` (replaces defaults). Set to `false` to append your custom dates to the default quick pick options.
|
|
10
|
-
|