playbook_ui 15.0.0.pre.alpha.removewebpacker10550 → 15.0.0.pre.alpha.removewebpacker10589
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/_playbook.scss +2 -0
- data/app/pb_kits/playbook/pb_card/_card.scss +12 -4
- data/app/pb_kits/playbook/pb_card/_card.tsx +3 -3
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +10 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_highlight.html.erb +3 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_highlight.jsx +8 -0
- data/app/pb_kits/playbook/pb_icon_button/_icon_button.tsx +1 -0
- data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +2 -1
- data/app/pb_kits/playbook/pb_nav/_item.tsx +19 -5
- data/app/pb_kits/playbook/pb_nav/item.html.erb +6 -2
- 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_pb_circle_chart/_pb_circle_chart.scss +3 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.tsx +62 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.html.erb +31 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +81 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.html.erb +25 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +40 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.md +5 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.html.erb +27 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +39 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md +5 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.html.erb +93 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +131 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.md +14 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.html.erb +42 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +58 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.html.erb +24 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +38 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.html.erb +22 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +33 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.html.erb +118 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +144 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +60 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.html.erb +24 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +42 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.html.erb +38 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +52 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/example.yml +29 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/index.js +11 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/pbCircleChartTheme.ts +88 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.html.erb +1 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.rb +28 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +51 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +2 -2
- data/dist/chunks/{_line_graph-BgI_x0Qp.js → _line_graph-DeH7NK-i.js} +1 -1
- data/dist/chunks/{_typeahead-DCpj5VBx.js → _typeahead-CCGp0OQe.js} +1 -1
- data/dist/chunks/{_weekday_stacked-Bq-Luje1.js → _weekday_stacked-BHLwECdV.js} +2 -2
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +6 -0
- 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/forms/builder/form_field_builder.rb +28 -1
- data/lib/playbook/kit_base.rb +3 -0
- data/lib/playbook/version.rb +1 -1
- metadata +37 -5
@@ -4,6 +4,15 @@ module Playbook
|
|
4
4
|
module Forms
|
5
5
|
class Builder
|
6
6
|
class FormFieldBuilder < Module
|
7
|
+
MASK_PATTERNS = {
|
8
|
+
"currency" => '^\$\d{1,3}(?:,\d{3})*(?:\.\d{2})?$',
|
9
|
+
"zip_code" => '\d{5}',
|
10
|
+
"postal_code" => '\d{5}-\d{4}',
|
11
|
+
"ssn" => '\d{3}-\d{2}-\d{4}',
|
12
|
+
"credit_card" => '\d{4} \d{4} \d{4} \d{4}',
|
13
|
+
"cvv" => '\d{3,4}',
|
14
|
+
}.freeze
|
15
|
+
|
7
16
|
def initialize(method_name, kit_name:)
|
8
17
|
define_method method_name do |name, props: {}, **options, &block|
|
9
18
|
props = props.dup
|
@@ -12,11 +21,29 @@ module Playbook
|
|
12
21
|
options[:skip_default_ids] = false unless options.key?(:skip_default_ids)
|
13
22
|
options[:required] = true if props[:required]
|
14
23
|
options[:placeholder] = props[:placeholder] || ""
|
24
|
+
options[:type] = props[:type] if props.key?(:type)
|
25
|
+
options[:value] = props[:value] if props.key?(:value)
|
26
|
+
options[:disabled] = true if props.key?(:disabled) && props[:disabled]
|
27
|
+
if props.key?(:disabled)
|
28
|
+
cursor_style = props[:disabled] ? "not-allowed" : "pointer"
|
29
|
+
existing_style = options[:style] || ""
|
30
|
+
|
31
|
+
options[:style] =
|
32
|
+
existing_style.empty? ? "cursor: #{cursor_style}" : "#{existing_style}; cursor: #{cursor_style}"
|
33
|
+
end
|
34
|
+
if props.key?(:autocomplete)
|
35
|
+
options[:autocomplete] = props[:autocomplete] == true ? nil : (props[:autocomplete].presence || "off")
|
36
|
+
end
|
37
|
+
if props.key?(:mask) && props[:mask].present?
|
38
|
+
options[:mask] = props[:mask]
|
39
|
+
options[:data] = (options[:data] || {}).merge(pb_input_mask: true)
|
40
|
+
options[:pattern] = MASK_PATTERNS[props[:mask]]
|
41
|
+
end
|
15
42
|
|
16
43
|
if props.key?(:validation)
|
17
44
|
validation = props[:validation]
|
18
45
|
options[:pattern] = validation[:pattern] if validation[:pattern].present?
|
19
|
-
options[:data] = {
|
46
|
+
options[:data] = (options[:data] || {}).merge(message: validation[:message]) if validation[:message].present?
|
20
47
|
end
|
21
48
|
|
22
49
|
input = super(name, **options, &block)
|
data/lib/playbook/kit_base.rb
CHANGED
@@ -137,6 +137,9 @@ module Playbook
|
|
137
137
|
end
|
138
138
|
|
139
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.
|
140
143
|
def react_component(component_name, props = {}, html_options = {})
|
141
144
|
# Convert props to JSON for the data attribute
|
142
145
|
props_json = props.to_json
|
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.0.0.pre.alpha.
|
4
|
+
version: 15.0.0.pre.alpha.removewebpacker10589
|
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-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -2434,6 +2434,38 @@ files:
|
|
2434
2434
|
- app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.html.erb
|
2435
2435
|
- app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb
|
2436
2436
|
- app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx
|
2437
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.scss
|
2438
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.tsx
|
2439
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.html.erb
|
2440
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx
|
2441
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.html.erb
|
2442
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx
|
2443
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.md
|
2444
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.html.erb
|
2445
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx
|
2446
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md
|
2447
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.html.erb
|
2448
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx
|
2449
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.md
|
2450
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.html.erb
|
2451
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx
|
2452
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.html.erb
|
2453
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx
|
2454
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.html.erb
|
2455
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx
|
2456
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.html.erb
|
2457
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx
|
2458
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx
|
2459
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.html.erb
|
2460
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx
|
2461
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.html.erb
|
2462
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx
|
2463
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/example.yml
|
2464
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/docs/index.js
|
2465
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/pbCircleChartTheme.ts
|
2466
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.html.erb
|
2467
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.rb
|
2468
|
+
- app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx
|
2437
2469
|
- app/pb_kits/playbook/pb_person/_person.scss
|
2438
2470
|
- app/pb_kits/playbook/pb_person/_person.tsx
|
2439
2471
|
- app/pb_kits/playbook/pb_person/docs/_description.md
|
@@ -3643,9 +3675,9 @@ files:
|
|
3643
3675
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3644
3676
|
- app/pb_kits/playbook/utilities/text.ts
|
3645
3677
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3646
|
-
- dist/chunks/_line_graph-
|
3647
|
-
- dist/chunks/_typeahead-
|
3648
|
-
- dist/chunks/_weekday_stacked-
|
3678
|
+
- dist/chunks/_line_graph-DeH7NK-i.js
|
3679
|
+
- dist/chunks/_typeahead-CCGp0OQe.js
|
3680
|
+
- dist/chunks/_weekday_stacked-BHLwECdV.js
|
3649
3681
|
- dist/chunks/componentRegistry-DzmmLR2x.js
|
3650
3682
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3651
3683
|
- dist/chunks/lib-QZuu1ltS.js
|