playbook_ui 15.1.0.pre.rc.4 → 15.1.0.pre.rc.6
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/Components/RegularTableView.tsx +12 -11
- data/app/pb_kits/playbook/pb_advanced_table/Components/VirtualizedTableView.tsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +7 -2
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +5 -0
- data/app/pb_kits/playbook/pb_contact/contact.rb +4 -0
- data/app/pb_kits/playbook/pb_contact/contact.test.js +21 -1
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb +16 -1
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +15 -0
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.md +5 -0
- data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb +6 -0
- data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx +6 -0
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.html.erb +3 -3
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.html.erb +3 -3
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.html.erb +3 -3
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.html.erb +3 -3
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.html.erb +3 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +2 -2
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +13 -5
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.html.erb +23 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.jsx +45 -7
- data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +4 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.test.js +165 -0
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +24 -8
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.html.erb +0 -10
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx +0 -9
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb +3 -17
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +0 -15
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb +0 -2
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx +0 -2
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.md +5 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.html.erb +12 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.jsx +25 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.html.erb +4 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.jsx +17 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.html.erb +18 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.jsx +44 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.html.erb +0 -14
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx +0 -14
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.html.erb +0 -4
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.jsx +0 -4
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx +0 -1
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.md +5 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.html.erb +16 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.jsx +30 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.html.erb +16 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.jsx +30 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.html.erb +26 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.jsx +41 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.md +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +18 -6
- data/app/pb_kits/playbook/pb_timestamp/docs/index.js +6 -0
- data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +29 -7
- data/app/pb_kits/playbook/pb_timestamp/timestamp.test.js +69 -4
- data/dist/chunks/{_line_graph-CUfJ7E4h.js → _line_graph-DeH7NK-i.js} +1 -1
- data/dist/chunks/{_typeahead-DCp1lVJx.js → _typeahead-CCGp0OQe.js} +1 -1
- data/dist/chunks/{_weekday_stacked-YwRTPuBs.js → _weekday_stacked-DhJzB115.js} +3 -3
- data/dist/chunks/componentRegistry-DzmmLR2x.js +1 -0
- data/dist/chunks/{lib-BTs5acfO.js → lib-QZuu1ltS.js} +1 -1
- data/dist/chunks/{pb_form_validation-CKkaQFX3.js → pb_form_validation-CleM960_.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +2 -2
- 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/engine.rb +0 -1
- data/lib/playbook/kit_base.rb +23 -2
- data/lib/playbook/version.rb +1 -1
- metadata +38 -27
- data/app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md +0 -1
data/lib/playbook/engine.rb
CHANGED
data/lib/playbook/kit_base.rb
CHANGED
@@ -122,7 +122,7 @@ module Playbook
|
|
122
122
|
html_options.each do |key, value|
|
123
123
|
if key == :style && value.is_a?(Hash)
|
124
124
|
# Convert style hash to CSS string
|
125
|
-
merged[:style] = value.map { |k, v| "#{k.to_s.
|
125
|
+
merged[:style] = value.map { |k, v| "#{k.to_s.tr('_', '-')}: #{v}" }.join("; ")
|
126
126
|
else
|
127
127
|
merged[key] = value
|
128
128
|
end
|
@@ -136,6 +136,27 @@ module Playbook
|
|
136
136
|
merged.deep_merge(data_attributes)
|
137
137
|
end
|
138
138
|
|
139
|
+
# Custom react_component helper to replace Webpacker React
|
140
|
+
# This will render a div with data attributes for the component name and props
|
141
|
+
# The mounting script will look for these divs and mount the appropriate React components
|
142
|
+
# Sister def in app/helpers/react_helper in playbook-website. Any changes here should be reflected there.
|
143
|
+
def react_component(component_name, props = {}, html_options = {})
|
144
|
+
# Convert props to JSON for the data attribute
|
145
|
+
props_json = props.to_json
|
146
|
+
|
147
|
+
# Build the HTML attributes
|
148
|
+
html_attrs = {
|
149
|
+
"data-pb-react-component" => component_name,
|
150
|
+
"data-pb-react-props" => props_json,
|
151
|
+
}
|
152
|
+
|
153
|
+
# Merge with any additional HTML options
|
154
|
+
html_attrs.merge!(html_options)
|
155
|
+
|
156
|
+
# Return the div element
|
157
|
+
content_tag(:div, "", html_attrs)
|
158
|
+
end
|
159
|
+
|
139
160
|
def global_inline_props
|
140
161
|
{
|
141
162
|
height: height,
|
@@ -172,7 +193,7 @@ module Playbook
|
|
172
193
|
end
|
173
194
|
|
174
195
|
def dynamic_inline_props
|
175
|
-
styles = global_inline_props.map { |key, value| "#{key.to_s.
|
196
|
+
styles = global_inline_props.map { |key, value| "#{key.to_s.tr('_', '-')}: #{value}" if inline_validator(key, value) }.compact
|
176
197
|
styles.join("; ").presence
|
177
198
|
end
|
178
199
|
|
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.1.0.pre.rc.
|
4
|
+
version: 15.1.0.pre.rc.6
|
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: 2025-09-
|
12
|
+
date: 2025-09-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -53,20 +53,6 @@ dependencies:
|
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 5.2.4.5
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: react-rails
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - '='
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 2.6.1
|
63
|
-
type: :runtime
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - '='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 2.6.1
|
70
56
|
- !ruby/object:Gem::Dependency
|
71
57
|
name: view_component
|
72
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,19 +68,19 @@ dependencies:
|
|
82
68
|
- !ruby/object:Gem::Version
|
83
69
|
version: 2.83.0
|
84
70
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
71
|
+
name: vite_rails
|
86
72
|
requirement: !ruby/object:Gem::Requirement
|
87
73
|
requirements:
|
88
|
-
- - "
|
74
|
+
- - ">="
|
89
75
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0
|
76
|
+
version: '0'
|
91
77
|
type: :runtime
|
92
78
|
prerelease: false
|
93
79
|
version_requirements: !ruby/object:Gem::Requirement
|
94
80
|
requirements:
|
95
|
-
- - "
|
81
|
+
- - ">="
|
96
82
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0
|
83
|
+
version: '0'
|
98
84
|
- !ruby/object:Gem::Dependency
|
99
85
|
name: brakeman
|
100
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -889,6 +875,7 @@ files:
|
|
889
875
|
- app/pb_kits/playbook/pb_contact/contact.test.js
|
890
876
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb
|
891
877
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx
|
878
|
+
- app/pb_kits/playbook/pb_contact/docs/_contact_default.md
|
892
879
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md
|
893
880
|
- app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md
|
894
881
|
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb
|
@@ -2770,6 +2757,7 @@ files:
|
|
2770
2757
|
- app/pb_kits/playbook/pb_section_separator/docs/index.js
|
2771
2758
|
- app/pb_kits/playbook/pb_section_separator/section_separator.html.erb
|
2772
2759
|
- app/pb_kits/playbook/pb_section_separator/section_separator.rb
|
2760
|
+
- app/pb_kits/playbook/pb_section_separator/section_separator.test.js
|
2773
2761
|
- app/pb_kits/playbook/pb_select/_select.scss
|
2774
2762
|
- app/pb_kits/playbook/pb_select/_select.tsx
|
2775
2763
|
- app/pb_kits/playbook/pb_select/docs/_description.md
|
@@ -3317,25 +3305,47 @@ files:
|
|
3317
3305
|
- app/pb_kits/playbook/pb_timestamp/_timestamp.tsx
|
3318
3306
|
- app/pb_kits/playbook/pb_timestamp/docs/_description.md
|
3319
3307
|
- app/pb_kits/playbook/pb_timestamp/docs/_footer.md
|
3320
|
-
- app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md
|
3321
3308
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.html.erb
|
3322
3309
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
|
3310
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.md
|
3323
3311
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align_swift.md
|
3324
3312
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb
|
3325
3313
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
|
3314
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.md
|
3326
3315
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default_swift.md
|
3327
3316
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb
|
3328
3317
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx
|
3318
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.md
|
3329
3319
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_swift.md
|
3330
3320
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_props_swift.md
|
3321
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.html.erb
|
3322
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.jsx
|
3323
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.md
|
3324
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.html.erb
|
3325
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.jsx
|
3326
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.md
|
3327
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.html.erb
|
3328
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.jsx
|
3329
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.md
|
3331
3330
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.html.erb
|
3332
3331
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
|
3332
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.md
|
3333
3333
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_swift.md
|
3334
3334
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.html.erb
|
3335
3335
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.jsx
|
3336
3336
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.md
|
3337
3337
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.html.erb
|
3338
3338
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx
|
3339
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.md
|
3340
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.html.erb
|
3341
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.jsx
|
3342
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.md
|
3343
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.html.erb
|
3344
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.jsx
|
3345
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.md
|
3346
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.html.erb
|
3347
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.jsx
|
3348
|
+
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.md
|
3339
3349
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_swift.md
|
3340
3350
|
- app/pb_kits/playbook/pb_timestamp/docs/example.yml
|
3341
3351
|
- app/pb_kits/playbook/pb_timestamp/docs/index.js
|
@@ -3689,12 +3699,13 @@ files:
|
|
3689
3699
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3690
3700
|
- app/pb_kits/playbook/utilities/text.ts
|
3691
3701
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3692
|
-
- dist/chunks/_line_graph-
|
3693
|
-
- dist/chunks/_typeahead-
|
3694
|
-
- dist/chunks/_weekday_stacked-
|
3702
|
+
- dist/chunks/_line_graph-DeH7NK-i.js
|
3703
|
+
- dist/chunks/_typeahead-CCGp0OQe.js
|
3704
|
+
- dist/chunks/_weekday_stacked-DhJzB115.js
|
3705
|
+
- dist/chunks/componentRegistry-DzmmLR2x.js
|
3695
3706
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3696
|
-
- dist/chunks/lib-
|
3697
|
-
- dist/chunks/pb_form_validation-
|
3707
|
+
- dist/chunks/lib-QZuu1ltS.js
|
3708
|
+
- dist/chunks/pb_form_validation-CleM960_.js
|
3698
3709
|
- dist/chunks/vendor.js
|
3699
3710
|
- dist/menu.yml
|
3700
3711
|
- dist/playbook-doc.js
|
@@ -1 +0,0 @@
|
|
1
|
-
Use these only to display status updates in areas that has a lot of data.
|