playbook_ui 14.13.0.pre.alpha.play1754pbtagprogressradio6160 → 14.13.0.pre.alpha.play1834depupdatesass6024
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_bar_graph/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +1 -4
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +4 -7
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +3 -6
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +2 -1
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +0 -3
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +6 -1
- data/app/pb_kits/playbook/pb_nav/item.html.erb +19 -7
- data/app/pb_kits/playbook/pb_nav/nav.html.erb +8 -3
- data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +6 -1
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +6 -1
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +6 -1
- data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +5 -1
- data/app/pb_kits/playbook/pb_progress_step/progress_step.html.erb +5 -1
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +5 -1
- data/app/pb_kits/playbook/pb_radio/radio.html.erb +11 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_table/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_table/index.ts +9 -41
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -4
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +2 -29
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +3 -31
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +7 -13
- data/app/pb_kits/playbook/pb_table/table_body.rb +0 -2
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +7 -14
- data/app/pb_kits/playbook/pb_table/table_row.rb +1 -14
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +0 -14
- data/app/pb_kits/playbook/pb_text_input/index.js +0 -9
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +2 -5
- data/dist/chunks/{_typeahead-KwZhr9u1.js → _typeahead-DQTwAd_2.js} +4 -4
- data/dist/chunks/_weekday_stacked-CnPEqV7l.js +45 -0
- data/dist/chunks/{lib-D3us1bGD.js → lib-WQEeEj3t.js} +1 -1
- data/dist/chunks/{pb_form_validation-BpihMSOQ.js → pb_form_validation-Cq64l4zn.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- 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 -21
- data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +0 -58
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +0 -64
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +0 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +0 -90
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +0 -5
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +0 -27
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +0 -47
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +0 -88
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +0 -51
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +0 -96
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +0 -101
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +0 -1
- data/dist/chunks/_weekday_stacked-DSJpSZ3B.js +0 -45
- /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_with_custom_click_react.md → _table_with_collapsible_with_custom_click.md} +0 -0
@@ -1,17 +1,11 @@
|
|
1
1
|
<% if object.tag == "table" %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
class: object.classname,
|
10
|
-
data: object.data,
|
11
|
-
id: object.id,
|
12
|
-
**combined_html_options) do %>
|
13
|
-
<%= content.presence %>
|
14
|
-
<% end %>
|
2
|
+
<%= content_tag(:tbody,
|
3
|
+
aria: object.aria,
|
4
|
+
class: object.classname,
|
5
|
+
data: object.data,
|
6
|
+
id: object.id,
|
7
|
+
**combined_html_options) do %>
|
8
|
+
<%= content.presence %>
|
15
9
|
<% end %>
|
16
10
|
<% else %>
|
17
11
|
<%= content_tag(:div,
|
@@ -5,7 +5,6 @@
|
|
5
5
|
data: object.data.merge(id: object.id),
|
6
6
|
id: object.id,
|
7
7
|
'data-pb-table-collapsible-wrapper' => true,
|
8
|
-
'data-pb-table-collapsible-cell-id' => object.toggle_cell_id,
|
9
8
|
**combined_html_options) do %>
|
10
9
|
<%= content.presence %>
|
11
10
|
<% end %>
|
@@ -19,19 +18,13 @@
|
|
19
18
|
<% end %>
|
20
19
|
</tr>
|
21
20
|
<% elsif object.tag == "table" %>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
class: object.classname,
|
30
|
-
data: object.data,
|
31
|
-
id: object.id,
|
32
|
-
**combined_html_options) do %>
|
33
|
-
<%= content.presence %>
|
34
|
-
<% end %>
|
21
|
+
<%= content_tag(:tr,
|
22
|
+
aria: object.aria,
|
23
|
+
class: object.classname,
|
24
|
+
data: object.data,
|
25
|
+
id: object.id,
|
26
|
+
**combined_html_options) do %>
|
27
|
+
<%= content.presence %>
|
35
28
|
<% end %>
|
36
29
|
<% else %>
|
37
30
|
<%= content_tag(:div,
|
@@ -13,14 +13,9 @@ module Playbook
|
|
13
13
|
prop :collapsible_content
|
14
14
|
prop :collapsible_side_highlight, type: Playbook::Props::Boolean,
|
15
15
|
default: true
|
16
|
-
prop :toggle_cell_id, type: Playbook::Props::String
|
17
|
-
prop :draggable_item, type: Playbook::Props::Boolean,
|
18
|
-
default: false
|
19
|
-
prop :drag_id, type: Playbook::Props::String,
|
20
|
-
default: nil
|
21
16
|
|
22
17
|
def classname
|
23
|
-
generate_classname("pb_table_row_kit", side_highlight_class) + tag_class
|
18
|
+
generate_classname("pb_table_row_kit", side_highlight_class) + tag_class
|
24
19
|
end
|
25
20
|
|
26
21
|
def side_highlight_class
|
@@ -30,14 +25,6 @@ module Playbook
|
|
30
25
|
def tag_class
|
31
26
|
" pb_table_tr"
|
32
27
|
end
|
33
|
-
|
34
|
-
def collapsible_cell_class
|
35
|
-
if toggle_cell_id
|
36
|
-
" collapsible_cell"
|
37
|
-
else
|
38
|
-
""
|
39
|
-
end
|
40
|
-
end
|
41
28
|
end
|
42
29
|
end
|
43
30
|
end
|
@@ -27,20 +27,6 @@
|
|
27
27
|
placeholder: "123-45-6789"
|
28
28
|
}) %>
|
29
29
|
|
30
|
-
<%= pb_rails("text_input", props: {
|
31
|
-
label: "Credit Card",
|
32
|
-
mask: "credit_card",
|
33
|
-
margin_bottom: "md",
|
34
|
-
placeholder: "1234 5678 9012 3456"
|
35
|
-
}) %>
|
36
|
-
|
37
|
-
<%= pb_rails("text_input", props: {
|
38
|
-
label: "CVV",
|
39
|
-
mask: "cvv",
|
40
|
-
margin_bottom: "md",
|
41
|
-
placeholder: "123"
|
42
|
-
}) %>
|
43
|
-
|
44
30
|
<%= pb_rails("title" , props: {
|
45
31
|
text: "Hidden Input Under The Hood",
|
46
32
|
padding_bottom: "sm"
|
@@ -27,8 +27,6 @@ export default class PbTextInput extends PbEnhancedElement {
|
|
27
27
|
ssn: 'ssn',
|
28
28
|
postal_code: 'postalCode',
|
29
29
|
zip_code: 'zipCode',
|
30
|
-
credit_card: 'creditCard',
|
31
|
-
cvv: 'cvv',
|
32
30
|
}[maskType];
|
33
31
|
|
34
32
|
if (maskKey && INPUTMASKS[maskKey]) {
|
@@ -47,9 +45,6 @@ export default class PbTextInput extends PbEnhancedElement {
|
|
47
45
|
case "currency":
|
48
46
|
sanitizedInput.value = sanitizeCurrency(formattedValue);
|
49
47
|
break;
|
50
|
-
case "credit_card":
|
51
|
-
sanitizedInput.value = sanitizeCreditCard(formattedValue);
|
52
|
-
break;
|
53
48
|
default:
|
54
49
|
sanitizedInput.value = formattedValue;
|
55
50
|
}
|
@@ -68,10 +63,6 @@ function sanitizeCurrency(input) {
|
|
68
63
|
return input.replace(/[$,]/g, "");
|
69
64
|
}
|
70
65
|
|
71
|
-
function sanitizeCreditCard(input) {
|
72
|
-
return input.replace(/\D/g, "");
|
73
|
-
}
|
74
|
-
|
75
66
|
function setCursorPosition(inputElement, cursorPosition, rawValue, formattedValue) {
|
76
67
|
const difference = formattedValue.length - rawValue.length;
|
77
68
|
const newPosition = Math.max(0, cursorPosition + difference);
|
@@ -4,15 +4,13 @@
|
|
4
4
|
module Playbook
|
5
5
|
module PbTextInput
|
6
6
|
class TextInput < Playbook::KitBase
|
7
|
-
VALID_MASKS = %w[currency
|
7
|
+
VALID_MASKS = %w[currency zipCode postalCode ssn].freeze
|
8
8
|
|
9
9
|
MASK_PATTERNS = {
|
10
10
|
"currency" => '^\$\d{1,3}(?:,\d{3})*(?:\.\d{2})?$',
|
11
11
|
"zip_code" => '\d{5}',
|
12
12
|
"postal_code" => '\d{5}-\d{4}',
|
13
13
|
"ssn" => '\d{3}-\d{2}-\d{4}',
|
14
|
-
"credit_card" => '\d{4} \d{4} \d{4} \d{4}',
|
15
|
-
"cvv" => '\d{3,4}',
|
16
14
|
}.freeze
|
17
15
|
|
18
16
|
prop :autocomplete, type: Playbook::Props::Boolean,
|
@@ -36,8 +34,7 @@ module Playbook
|
|
36
34
|
prop :add_on, type: Playbook::Props::NestedProps,
|
37
35
|
nested_kit: Playbook::PbTextInput::AddOn
|
38
36
|
|
39
|
-
prop :mask, type: Playbook::Props::
|
40
|
-
values: ["currency", "zip_code", "postal_code", "ssn", "credit_card", "cvv", nil],
|
37
|
+
prop :mask, type: Playbook::Props::String,
|
41
38
|
default: nil
|
42
39
|
|
43
40
|
def classname
|