playbook_ui 15.6.0.pre.alpha.PLAY2686contactkittextonly13049 → 15.6.0.pre.alpha.draggableask12898
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_card/docs/_card_header.md +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_highlight.md +1 -1
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +2 -2
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleIcon.tsx +8 -10
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.jsx +1 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_state.jsx +3 -0
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +24 -51
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +19 -53
- data/app/pb_kits/playbook/pb_contact/contact.rb +1 -11
- data/app/pb_kits/playbook/pb_contact/contact.test.js +0 -76
- data/app/pb_kits/playbook/pb_contact/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_contact/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +0 -24
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +3 -181
- data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +88 -91
- data/app/pb_kits/playbook/pb_draggable/context/types.ts +1 -1
- data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.tsx +3 -3
- data/app/pb_kits/playbook/pb_radio/docs/_radio_error.md +1 -1
- data/app/pb_kits/playbook/pb_select/_select.tsx +3 -8
- data/app/pb_kits/playbook/pb_select/docs/_select_error.md +1 -1
- data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_select/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_select/select.html.erb +2 -2
- data/app/pb_kits/playbook/pb_select/select.rb +1 -3
- data/app/pb_kits/playbook/pb_select/select.test.js +0 -23
- data/app/pb_kits/playbook/pb_table/_table.tsx +33 -187
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_table/table.html.erb +12 -68
- data/app/pb_kits/playbook/pb_table/table.rb +3 -22
- data/app/pb_kits/playbook/pb_table/table.test.js +0 -143
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.md +1 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.md +1 -1
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +0 -3
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md +1 -1
- data/app/pb_kits/playbook/pb_timeline/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_timeline/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +1 -1
- data/app/pb_kits/playbook/pb_timeline/item.rb +0 -2
- data/app/pb_kits/playbook/pb_timeline/label.html.erb +1 -2
- data/app/pb_kits/playbook/pb_timeline/label.rb +0 -2
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +0 -3
- data/app/pb_kits/playbook/pb_timeline/timeline.test.js +0 -51
- data/app/pb_kits/playbook/tokens/_colors.scss +1 -2
- data/dist/chunks/_typeahead-319r1pyq.js +6 -0
- data/dist/chunks/lib-CgpqUb6l.js +29 -0
- 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/collection_select_field.rb +1 -9
- data/lib/playbook/forms/builder/select_field.rb +1 -9
- data/lib/playbook/forms/builder/time_zone_select_field.rb +1 -9
- data/lib/playbook/pb_kit_helper.rb +0 -35
- data/lib/playbook/version.rb +1 -1
- metadata +4 -23
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.html.erb +0 -33
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.jsx +0 -46
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_rails.md +0 -2
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_react.md +0 -2
- data/app/pb_kits/playbook/pb_select/docs/_select_input_options.html.erb +0 -16
- data/app/pb_kits/playbook/pb_select/docs/_select_input_options.jsx +0 -30
- data/app/pb_kits/playbook/pb_select/docs/_select_input_options.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx +0 -134
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.md +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.html.erb +0 -101
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.md +0 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx +0 -180
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb +0 -122
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.md +0 -3
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.html.erb +0 -60
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.jsx +0 -118
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.md +0 -1
- data/app/pb_kits/playbook/utilities/deprecated.ts +0 -73
- data/dist/chunks/_typeahead-CHwm9MTE.js +0 -6
- data/dist/chunks/lib-Cugvy62C.js +0 -29
|
@@ -4,18 +4,10 @@ module Playbook
|
|
|
4
4
|
module Forms
|
|
5
5
|
class Builder
|
|
6
6
|
def collection_select(name, collection, value_method, text_method, options = {}, html_options = {}, props: {})
|
|
7
|
-
props[:
|
|
8
|
-
props[:input_options][:id] ||= "#{@object_name}_#{name}"
|
|
9
|
-
|
|
10
|
-
props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
|
|
11
|
-
|
|
7
|
+
props[:label] = @template.label(@object_name, name) if props[:label] == true
|
|
12
8
|
options[:skip_default_ids] = false unless options.key?(:skip_default_ids)
|
|
13
9
|
options[:prompt] = props[:blank_selection] || ""
|
|
14
10
|
html_options[:required] = "required" if props[:required]
|
|
15
|
-
html_options[:id] = props[:input_options][:id]
|
|
16
|
-
html_options[:class] = props[:input_options][:class] if props[:input_options][:class]
|
|
17
|
-
html_options[:data] = (html_options[:data] || {}).merge(props[:input_options][:data] || {})
|
|
18
|
-
|
|
19
11
|
input = super(name, collection, value_method, text_method, options, html_options)
|
|
20
12
|
|
|
21
13
|
@template.pb_rails("select", props: props) do
|
|
@@ -4,18 +4,10 @@ module Playbook
|
|
|
4
4
|
module Forms
|
|
5
5
|
class Builder
|
|
6
6
|
def select(name, choices = nil, options = {}, html_options = {}, props: {}, &block)
|
|
7
|
-
props[:
|
|
8
|
-
props[:input_options][:id] ||= "#{@object_name}_#{name}"
|
|
9
|
-
|
|
10
|
-
props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
|
|
11
|
-
|
|
7
|
+
props[:label] = @template.label(@object_name, name) if props[:label] == true
|
|
12
8
|
options[:skip_default_ids] = false unless options.key?(:skip_default_ids)
|
|
13
9
|
options[:prompt] = props[:blank_selection] || ""
|
|
14
10
|
html_options[:required] = "required" if props[:required]
|
|
15
|
-
html_options[:id] = props[:input_options][:id]
|
|
16
|
-
html_options[:class] = props[:input_options][:class] if props[:input_options][:class]
|
|
17
|
-
html_options[:data] = (html_options[:data] || {}).merge(props[:input_options][:data] || {})
|
|
18
|
-
|
|
19
11
|
input = super(name, choices, options, html_options, &block)
|
|
20
12
|
|
|
21
13
|
@template.pb_rails("select", props: props) do
|
|
@@ -4,18 +4,10 @@ module Playbook
|
|
|
4
4
|
module Forms
|
|
5
5
|
class Builder
|
|
6
6
|
def time_zone_select_field(name, choices = {}, options = {}, html_options = {}, props: {})
|
|
7
|
-
props[:
|
|
8
|
-
props[:input_options][:id] ||= "#{@object_name}_#{name}"
|
|
9
|
-
|
|
10
|
-
props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
|
|
11
|
-
|
|
7
|
+
props[:label] = @template.label(@object_name, name) if props[:label] == true
|
|
12
8
|
options[:skip_default_ids] = false unless options.key?(:skip_default_ids)
|
|
13
9
|
options[:prompt] = props[:blank_selection] || ""
|
|
14
10
|
html_options[:required] = "required" if props[:required]
|
|
15
|
-
html_options[:id] = props[:input_options][:id]
|
|
16
|
-
html_options[:class] = props[:input_options][:class] if props[:input_options][:class]
|
|
17
|
-
html_options[:data] = (html_options[:data] || {}).merge(props[:input_options][:data] || {})
|
|
18
|
-
|
|
19
11
|
input = @template.time_zone_select(@object_name, name, choices, options, html_options)
|
|
20
12
|
|
|
21
13
|
@template.pb_rails("select", props: props) do
|
|
@@ -13,40 +13,5 @@ module Playbook
|
|
|
13
13
|
render kit.new(props, &block), &block
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
|
-
|
|
17
|
-
def deprecated_kit_warning(kit_name, message = nil)
|
|
18
|
-
# Skip in test and production environments
|
|
19
|
-
return "".html_safe if Rails.env.test? || Rails.env.production?
|
|
20
|
-
|
|
21
|
-
# Build the warning message
|
|
22
|
-
base_message = "PLAYBOOK DEPRECATION WARNING\\n ----------------------------\\n The \\\"#{kit_name}\\\" kit is deprecated and will be removed in a future version."
|
|
23
|
-
|
|
24
|
-
full_message = if message
|
|
25
|
-
"#{base_message} #{message}"
|
|
26
|
-
else
|
|
27
|
-
"#{base_message} Please migrate to the recommended alternative"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Escape the message for JavaScript
|
|
31
|
-
escaped_message = full_message.gsub("'", "\\\\'").gsub("\n", "\\n")
|
|
32
|
-
|
|
33
|
-
# Return a self-executing script that checks if we're already warned
|
|
34
|
-
# Uses client-side tracking to ensure one warning per page load
|
|
35
|
-
# Only shows warnings on localhost (matching React behavior)
|
|
36
|
-
script = "<script type=\"text/javascript\">\n"
|
|
37
|
-
script += "(function() {\n"
|
|
38
|
-
script += " var hostname = window.location.hostname;\n"
|
|
39
|
-
script += " var isLocalDev = hostname === 'localhost' || hostname === '127.0.0.1' || hostname.endsWith('.local') || hostname.includes('local.') || !hostname;\n"
|
|
40
|
-
script += " if (!isLocalDev) return;\n"
|
|
41
|
-
script += " if (!window.__PB_WARNED_KITS__) window.__PB_WARNED_KITS__ = new Set();\n"
|
|
42
|
-
script += " if (!window.__PB_WARNED_KITS__.has('#{kit_name}')) {\n"
|
|
43
|
-
script += " window.__PB_WARNED_KITS__.add('#{kit_name}');\n"
|
|
44
|
-
script += " console.warn('#{escaped_message}');\n"
|
|
45
|
-
script += " }\n"
|
|
46
|
-
script += "})();\n"
|
|
47
|
-
script += "</script>"
|
|
48
|
-
|
|
49
|
-
script.html_safe
|
|
50
|
-
end
|
|
51
16
|
end
|
|
52
17
|
end
|
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.6.0.pre.alpha.
|
|
4
|
+
version: 15.6.0.pre.alpha.draggableask12898
|
|
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-12-
|
|
12
|
+
date: 2025-12-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: actionpack
|
|
@@ -892,10 +892,6 @@ files:
|
|
|
892
892
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default.md
|
|
893
893
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md
|
|
894
894
|
- app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md
|
|
895
|
-
- app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.html.erb
|
|
896
|
-
- app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.jsx
|
|
897
|
-
- app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_rails.md
|
|
898
|
-
- app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_react.md
|
|
899
895
|
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb
|
|
900
896
|
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx
|
|
901
897
|
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail_swift.md
|
|
@@ -2939,9 +2935,6 @@ files:
|
|
|
2939
2935
|
- app/pb_kits/playbook/pb_select/docs/_select_inline_compact.jsx
|
|
2940
2936
|
- app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.html.erb
|
|
2941
2937
|
- app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.jsx
|
|
2942
|
-
- app/pb_kits/playbook/pb_select/docs/_select_input_options.html.erb
|
|
2943
|
-
- app/pb_kits/playbook/pb_select/docs/_select_input_options.jsx
|
|
2944
|
-
- app/pb_kits/playbook/pb_select/docs/_select_input_options.md
|
|
2945
2938
|
- app/pb_kits/playbook/pb_select/docs/_select_multiple.html.erb
|
|
2946
2939
|
- app/pb_kits/playbook/pb_select/docs/_select_multiple.jsx
|
|
2947
2940
|
- app/pb_kits/playbook/pb_select/docs/_select_multiple.md
|
|
@@ -3249,14 +3242,6 @@ files:
|
|
|
3249
3242
|
- app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.jsx
|
|
3250
3243
|
- app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_rails.md
|
|
3251
3244
|
- app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_react.md
|
|
3252
|
-
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx
|
|
3253
|
-
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.md
|
|
3254
|
-
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.html.erb
|
|
3255
|
-
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.md
|
|
3256
|
-
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx
|
|
3257
|
-
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.md
|
|
3258
|
-
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb
|
|
3259
|
-
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.md
|
|
3260
3245
|
- app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb
|
|
3261
3246
|
- app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx
|
|
3262
3247
|
- app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md
|
|
@@ -3441,9 +3426,6 @@ files:
|
|
|
3441
3426
|
- app/pb_kits/playbook/pb_timeline/docs/_description.md
|
|
3442
3427
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_default.html.erb
|
|
3443
3428
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_default.jsx
|
|
3444
|
-
- app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.html.erb
|
|
3445
|
-
- app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.jsx
|
|
3446
|
-
- app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.md
|
|
3447
3429
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.html.erb
|
|
3448
3430
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.jsx
|
|
3449
3431
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb
|
|
@@ -3840,7 +3822,6 @@ files:
|
|
|
3840
3822
|
- app/pb_kits/playbook/utilities/_truncate.scss
|
|
3841
3823
|
- app/pb_kits/playbook/utilities/_vertical_align.scss
|
|
3842
3824
|
- app/pb_kits/playbook/utilities/_width.scss
|
|
3843
|
-
- app/pb_kits/playbook/utilities/deprecated.ts
|
|
3844
3825
|
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_content.scss
|
|
3845
3826
|
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_items.scss
|
|
3846
3827
|
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_self.scss
|
|
@@ -3880,9 +3861,9 @@ files:
|
|
|
3880
3861
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
|
3881
3862
|
- app/pb_kits/playbook/utilities/text.ts
|
|
3882
3863
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
|
3883
|
-
- dist/chunks/_typeahead-
|
|
3864
|
+
- dist/chunks/_typeahead-319r1pyq.js
|
|
3884
3865
|
- dist/chunks/lazysizes-B7xYodB-.js
|
|
3885
|
-
- dist/chunks/lib-
|
|
3866
|
+
- dist/chunks/lib-CgpqUb6l.js
|
|
3886
3867
|
- dist/chunks/vendor.js
|
|
3887
3868
|
- dist/menu.yml
|
|
3888
3869
|
- dist/playbook-rails-react-bindings.js
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<%= pb_rails("body", props: { color: "default" }) do %>
|
|
2
|
-
<%= pb_rails("contact", props: {
|
|
3
|
-
contact_value: "2125551234",
|
|
4
|
-
icon_enabled: false,
|
|
5
|
-
unstyled: true
|
|
6
|
-
}) %>
|
|
7
|
-
<% end %>
|
|
8
|
-
|
|
9
|
-
<%= pb_rails("body", props: { color: "light" }) do %>
|
|
10
|
-
<%= pb_rails("contact", props: {
|
|
11
|
-
contact_value: "12125551234",
|
|
12
|
-
icon_enabled: false,
|
|
13
|
-
unstyled: true
|
|
14
|
-
}) %>
|
|
15
|
-
<% end %>
|
|
16
|
-
|
|
17
|
-
<%= pb_rails("body", props: { color: "lighter" }) do %>
|
|
18
|
-
<%= pb_rails("contact", props: {
|
|
19
|
-
contact_value: "4155551234",
|
|
20
|
-
icon_enabled: false,
|
|
21
|
-
unstyled: true
|
|
22
|
-
}) %>
|
|
23
|
-
<% end %>
|
|
24
|
-
|
|
25
|
-
<%= pb_rails("body", props: { color: "default" }) do %>
|
|
26
|
-
<%= pb_rails("contact", props: {
|
|
27
|
-
contact_type: "extension",
|
|
28
|
-
contact_value: "1234",
|
|
29
|
-
icon_enabled: false,
|
|
30
|
-
unstyled: true
|
|
31
|
-
}) %>
|
|
32
|
-
<% end %>
|
|
33
|
-
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Contact from "../../pb_contact/_contact"
|
|
3
|
-
import Body from "../../pb_body/_body"
|
|
4
|
-
|
|
5
|
-
const ContactUnstyled = (props) => {
|
|
6
|
-
return (
|
|
7
|
-
<div>
|
|
8
|
-
<Body color="default">
|
|
9
|
-
<Contact
|
|
10
|
-
contactValue="2125551234"
|
|
11
|
-
iconEnabled={false}
|
|
12
|
-
unstyled
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
</Body>
|
|
16
|
-
<Body color="light">
|
|
17
|
-
<Contact
|
|
18
|
-
contactValue="12125551234"
|
|
19
|
-
iconEnabled={false}
|
|
20
|
-
unstyled
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
</Body>
|
|
24
|
-
<Body color="lighter">
|
|
25
|
-
<Contact
|
|
26
|
-
contactValue="4155551234"
|
|
27
|
-
iconEnabled={false}
|
|
28
|
-
unstyled
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
</Body>
|
|
32
|
-
<Body color="default">
|
|
33
|
-
<Contact
|
|
34
|
-
contactType="extension"
|
|
35
|
-
contactValue="1234"
|
|
36
|
-
iconEnabled={false}
|
|
37
|
-
unstyled
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
</Body>
|
|
41
|
-
</div>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export default ContactUnstyled
|
|
46
|
-
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
Use the Contact kit with `icon_enabled: false` and `unstyled: true` to display phone numbers with full typography control. When `unstyled: true`, the Contact kit renders just the formatted text without a Body wrapper, allowing you to wrap it in your own Typography kit to control the color and styling.
|
|
2
|
-
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
Use the Contact kit with `iconEnabled={false}` and `unstyled` to display phone numbers with full typography control. With `unstyled`, the Contact kit renders just the formatted text without a Body wrapper, allowing you to wrap it in your own Typography kit to control the color and styling.
|
|
2
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<%= pb_rails("select", props: {
|
|
2
|
-
label: "Favorite Food",
|
|
3
|
-
name: "favorite_food",
|
|
4
|
-
options: [
|
|
5
|
-
{ value: "pizza", value_text: "Pizza" },
|
|
6
|
-
{ value: "tacos", value_text: "Tacos" },
|
|
7
|
-
{ value: "sushi", value_text: "Sushi" }
|
|
8
|
-
],
|
|
9
|
-
input_options: {
|
|
10
|
-
'aria-label': "Select your favorite food",
|
|
11
|
-
class: "custom-select-class",
|
|
12
|
-
data: { controller: "search", action: "change->search#filter" },
|
|
13
|
-
id: "favorite-food-select"
|
|
14
|
-
}
|
|
15
|
-
}) %>
|
|
16
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import Select from '../_select'
|
|
4
|
-
|
|
5
|
-
const SelectInputOptions = (props) => {
|
|
6
|
-
const options = [
|
|
7
|
-
{ value: 'pizza', text: 'Pizza' },
|
|
8
|
-
{ value: 'tacos', text: 'Tacos' },
|
|
9
|
-
{ value: 'sushi', text: 'Sushi' },
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<>
|
|
14
|
-
<Select
|
|
15
|
-
inputOptions={{
|
|
16
|
-
'aria-label': 'Select your favorite food',
|
|
17
|
-
className: 'custom-select-class',
|
|
18
|
-
id: 'favorite-food-select',
|
|
19
|
-
}}
|
|
20
|
-
label="Favorite Food"
|
|
21
|
-
name="favorite_food"
|
|
22
|
-
options={options}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
</>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default SelectInputOptions
|
|
30
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Use the `input_options` / `inputOptions` prop to pass additional attributes directly to the underlying `<select>` element instead of the outer wrapper. This is useful for applying data attributes, custom IDs, or other HTML attributes that need to be on the select element itself.
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react"
|
|
2
|
-
import { Button, Date as DateKit, DatePicker, Dropdown, Select, Table, TextInput, Typeahead, Flex } from "playbook-ui"
|
|
3
|
-
|
|
4
|
-
// Mock Data for Table
|
|
5
|
-
const users = [
|
|
6
|
-
{ id: 1, name: "Jennifer", title: "Associate Scrum Master", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-01" },
|
|
7
|
-
{ id: 2, name: "Nick", title: "UX Engineer II", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-02" },
|
|
8
|
-
{ id: 3, name: "Nida", title: "Senior UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-03" },
|
|
9
|
-
{ id: 4, name: "Justin", title: "Director of User Experience Engineering", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-04" },
|
|
10
|
-
{ id: 5, name: "Edward", title: "UX Designer II", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-05" },
|
|
11
|
-
{ id: 6, name: "Elisa", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-06" },
|
|
12
|
-
{ id: 7, name: "Gary", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-07" },
|
|
13
|
-
{ id: 8, name: "Barkley", title: "Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-08" },
|
|
14
|
-
{ id: 9, name: "Aaron", title: "Associate Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-09" },
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
const TableWithFilterVariant = () => {
|
|
18
|
-
const [territory, setTerritory] = useState("")
|
|
19
|
-
|
|
20
|
-
// --------Filter content example ------
|
|
21
|
-
const filterContent = ({ closePopover }) => (
|
|
22
|
-
<>
|
|
23
|
-
<TextInput
|
|
24
|
-
label="Territory ID"
|
|
25
|
-
onChange={event => setTerritory(event.target.value)}
|
|
26
|
-
value={territory}
|
|
27
|
-
/>
|
|
28
|
-
|
|
29
|
-
<Typeahead
|
|
30
|
-
label="Title"
|
|
31
|
-
options={[
|
|
32
|
-
{ key: "senior-ux-engineer", label: "Senior UX Engineer", value: "senior-ux-engineer" },
|
|
33
|
-
{ key: "ux-engineer", label: "UX Engineer", value: "ux-engineer" },
|
|
34
|
-
{ key: "ux-designer", label: "UX Designer", value: "ux-designer" }
|
|
35
|
-
]}
|
|
36
|
-
/>
|
|
37
|
-
|
|
38
|
-
<Select
|
|
39
|
-
blankSelection="All Departments"
|
|
40
|
-
label="Department"
|
|
41
|
-
options={[
|
|
42
|
-
{ value: "Business Technology", label: "Business Technology", key: "business-technology" },
|
|
43
|
-
{ value: "Customer Development", label: "Customer Development", key: "customer-development" },
|
|
44
|
-
{ value: "Talent Acquisition", label: "Talent Acquisition", key: "talent-acquisition" }
|
|
45
|
-
]}
|
|
46
|
-
/>
|
|
47
|
-
|
|
48
|
-
<Dropdown
|
|
49
|
-
label="Branch"
|
|
50
|
-
options={[
|
|
51
|
-
{ key: "Philadelphia", label: "Philadelphia", value: "philadelphia" },
|
|
52
|
-
{ key: "New York", label: "New York", value: "new-york" },
|
|
53
|
-
{ key: "Austin", label: "Austin", value: "austin" }
|
|
54
|
-
]}
|
|
55
|
-
/>
|
|
56
|
-
|
|
57
|
-
<DatePicker
|
|
58
|
-
label="Start Date"
|
|
59
|
-
paddingY="sm"
|
|
60
|
-
pickerId="startedOn"
|
|
61
|
-
/>
|
|
62
|
-
<Flex spacing="between">
|
|
63
|
-
<Button
|
|
64
|
-
onClick={() => {
|
|
65
|
-
alert("No filtering functionality - just a pattern demo!")
|
|
66
|
-
closePopover()
|
|
67
|
-
}}
|
|
68
|
-
text="Filter"
|
|
69
|
-
/>
|
|
70
|
-
<Button
|
|
71
|
-
text="Defaults"
|
|
72
|
-
variant="secondary"
|
|
73
|
-
/>
|
|
74
|
-
</Flex>
|
|
75
|
-
</>
|
|
76
|
-
)
|
|
77
|
-
// -------End Filter content example ------
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<Table
|
|
81
|
-
filterContent={filterContent}
|
|
82
|
-
filterProps={{
|
|
83
|
-
results: 50,
|
|
84
|
-
sortOptions: {
|
|
85
|
-
territory_id: "Territory ID",
|
|
86
|
-
first_name: "Name",
|
|
87
|
-
started_on: "Start Date",
|
|
88
|
-
department_name: "Department",
|
|
89
|
-
title_name: "Title",
|
|
90
|
-
branch_branch_name: "Branch",
|
|
91
|
-
},
|
|
92
|
-
sortValue: [{ name: 'started_on', dir: 'asc' }],
|
|
93
|
-
}}
|
|
94
|
-
title="Table Title Here"
|
|
95
|
-
variant="withFilter"
|
|
96
|
-
>
|
|
97
|
-
<Table.Head>
|
|
98
|
-
<Table.Row>
|
|
99
|
-
<Table.Header>{'Territory ID'}</Table.Header>
|
|
100
|
-
<Table.Header>{'Name'}</Table.Header>
|
|
101
|
-
<Table.Header>{'Title'}</Table.Header>
|
|
102
|
-
<Table.Header>{'Department'}</Table.Header>
|
|
103
|
-
<Table.Header>{'Branch'}</Table.Header>
|
|
104
|
-
<Table.Header textAlign="right">{'Start Date'}</Table.Header>
|
|
105
|
-
</Table.Row>
|
|
106
|
-
</Table.Head>
|
|
107
|
-
<Table.Body>
|
|
108
|
-
{users.map((user) => (
|
|
109
|
-
<Table.Row key={user.id}>
|
|
110
|
-
<Table.Cell
|
|
111
|
-
marginX={{ xs: "sm" }}
|
|
112
|
-
numberSpacing="tabular"
|
|
113
|
-
>
|
|
114
|
-
{user.id}
|
|
115
|
-
</Table.Cell>
|
|
116
|
-
<Table.Cell marginX={{ xs: "sm" }}>{user.name}</Table.Cell>
|
|
117
|
-
<Table.Cell marginX={{ xs: "sm" }}>{user.title}</Table.Cell>
|
|
118
|
-
<Table.Cell marginX={{ xs: "sm" }}>{user.department}</Table.Cell>
|
|
119
|
-
<Table.Cell marginX={{ xs: "sm" }}>{user.branch}</Table.Cell>
|
|
120
|
-
<Table.Cell marginX={{ xs: "sm" }}>
|
|
121
|
-
<DateKit
|
|
122
|
-
alignment="right"
|
|
123
|
-
showCurrentYear
|
|
124
|
-
value={user.startDate}
|
|
125
|
-
/>
|
|
126
|
-
</Table.Cell>
|
|
127
|
-
</Table.Row>
|
|
128
|
-
))}
|
|
129
|
-
</Table.Body>
|
|
130
|
-
</Table>
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export default TableWithFilterVariant
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
Set the `variant` prop to `withFilter` to render a Table with a filter. The variant automatically handles:
|
|
2
|
-
|
|
3
|
-
- Card wrapper with standard responsive margins
|
|
4
|
-
- Optional `title` prop to render title above the card
|
|
5
|
-
- Filter component rendering with Design defaults
|
|
6
|
-
- SectionSeparator between filter and table
|
|
7
|
-
- Flex layout for proper alignment
|
|
8
|
-
|
|
9
|
-
#### Required Props
|
|
10
|
-
|
|
11
|
-
- `variant="withFilter"`: Enables the filter variant
|
|
12
|
-
- `filterContent`: A function that receives `{ closePopover }` and returns the filter's body content (inputs, buttons, etc.). Use this to pass in all input kits, etc needed inside the Filter itself.
|
|
13
|
-
- `filterProps`: An object containing Filter-specific props like `results`, `sortOptions`, `sortValue`, etc.
|
|
14
|
-
|
|
15
|
-
#### Optional Props
|
|
16
|
-
|
|
17
|
-
- `title`: Displays a title above the card
|
|
18
|
-
- All standard Table props (`size`, `collapse`, etc.) can be used, but defaults are already set to match Design guidelines
|
|
19
|
-
- All standard Filter props can be used, but defaults are already set to match Design guidelines.
|
|
20
|
-
|
|
21
|
-
#### Default Filter Props
|
|
22
|
-
|
|
23
|
-
The Table kit automatically sets these Filter defaults (which you can override via `filterProps`):
|
|
24
|
-
|
|
25
|
-
- `background={false}`
|
|
26
|
-
- `maxHeight="50vh"`
|
|
27
|
-
- `minWidth="xs"`
|
|
28
|
-
- `popoverProps={{ width: "350px" }}`
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
**IMPORTANT NOTE**:
|
|
32
|
-
The purpose of this variant is to provide an easy way to set up a Table with a Filter with Design standards applied by default.
|
|
33
|
-
|
|
34
|
-
If you are looking for more customization than this embedded variant provides, you may be better served by using the individual kits as demonstrated in our Table Filter Card Building Block [here](https://playbook.powerapp.cloud/building_blocks/table_filter_card/react).
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<% users = [
|
|
2
|
-
{ id: 1, name: "Jennifer", title: "Associate Scrum Master", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 1) },
|
|
3
|
-
{ id: 2, name: "Nick", title: "UX Engineer II", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 2) },
|
|
4
|
-
{ id: 3, name: "Nida", title: "Senior UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 3) },
|
|
5
|
-
{ id: 4, name: "Justin", title: "Director of User Experience Engineering", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 4) },
|
|
6
|
-
{ id: 5, name: "Edward", title: "UX Designer II", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 5) },
|
|
7
|
-
{ id: 6, name: "Elisa", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 6) },
|
|
8
|
-
{ id: 7, name: "Gary", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 7) },
|
|
9
|
-
{ id: 8, name: "Barkley", title: "Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 8) },
|
|
10
|
-
{ id: 9, name: "Aaron", title: "Associate Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 9) },
|
|
11
|
-
] %>
|
|
12
|
-
|
|
13
|
-
<% filter_content =
|
|
14
|
-
pb_rails("text_input", props: {
|
|
15
|
-
label: "Territory ID",
|
|
16
|
-
placeholder: "Enter Territory ID"
|
|
17
|
-
}) +
|
|
18
|
-
pb_rails("typeahead", props: {
|
|
19
|
-
label: "Title",
|
|
20
|
-
options: [
|
|
21
|
-
{ label: "Senior UX Engineer", value: "senior-ux-engineer" },
|
|
22
|
-
{ label: "UX Engineer", value: "ux-engineer" },
|
|
23
|
-
{ label: "UX Designer", value: "ux-designer" }
|
|
24
|
-
]
|
|
25
|
-
}) +
|
|
26
|
-
pb_rails("select", props: {
|
|
27
|
-
blank_selection: "All Departments",
|
|
28
|
-
label: "Department",
|
|
29
|
-
options: [
|
|
30
|
-
{ value: "Business Technology", text: "Business Technology" },
|
|
31
|
-
{ value: "Customer Development", text: "Customer Development" },
|
|
32
|
-
{ value: "Talent Acquisition", text: "Talent Acquisition" }
|
|
33
|
-
]
|
|
34
|
-
}) +
|
|
35
|
-
pb_rails("dropdown", props: {
|
|
36
|
-
label: "Branch",
|
|
37
|
-
options: [
|
|
38
|
-
{ label: "Philadelphia", value: "philadelphia" },
|
|
39
|
-
{ label: "New York", value: "new-york" },
|
|
40
|
-
{ label: "Austin", value: "austin" }
|
|
41
|
-
]
|
|
42
|
-
}) +
|
|
43
|
-
pb_rails("date_picker", props: {
|
|
44
|
-
label: "Start Date",
|
|
45
|
-
padding_y: "sm",
|
|
46
|
-
picker_id: "startedOn"
|
|
47
|
-
}) +
|
|
48
|
-
pb_rails("flex", props: { spacing: "between" }) do
|
|
49
|
-
pb_rails("button", props: {
|
|
50
|
-
text: "Filter",
|
|
51
|
-
}) +
|
|
52
|
-
pb_rails("button", props: {
|
|
53
|
-
text: "Defaults",
|
|
54
|
-
variant: "secondary"
|
|
55
|
-
})
|
|
56
|
-
end
|
|
57
|
-
%>
|
|
58
|
-
|
|
59
|
-
<%= pb_rails("table", props: {
|
|
60
|
-
variant: "with_filter",
|
|
61
|
-
title: "Table Title Here",
|
|
62
|
-
filter_content: filter_content,
|
|
63
|
-
filter_props: {
|
|
64
|
-
id: "user-table-filters-1",
|
|
65
|
-
results: 9,
|
|
66
|
-
sort_menu: [
|
|
67
|
-
{ item: "Start Date", link: "?q[sorts]=started_on+asc", active: true, direction: "asc" },
|
|
68
|
-
{ item: "First Name", link: "?q[sorts]=name+asc", active: false },
|
|
69
|
-
{ item: "Title", link: "?q[sorts]=title+asc", active: false },
|
|
70
|
-
{ item: "Department", link: "?q[sorts]=department+asc", active: false },
|
|
71
|
-
{ item: "Branch", link: "?q[sorts]=branch+asc", active: false },
|
|
72
|
-
{ item: "Territory ID", link: "?q[sorts]=territory_id+asc", active: false },
|
|
73
|
-
],
|
|
74
|
-
}
|
|
75
|
-
}) do %>
|
|
76
|
-
<%= pb_rails("table/table_head") do %>
|
|
77
|
-
<%= pb_rails("table/table_row") do %>
|
|
78
|
-
<%= pb_rails("table/table_header", props: { text: "Territory ID" }) %>
|
|
79
|
-
<%= pb_rails("table/table_header", props: { text: "Name" }) %>
|
|
80
|
-
<%= pb_rails("table/table_header", props: { text: "Title" }) %>
|
|
81
|
-
<%= pb_rails("table/table_header", props: { text: "Department" }) %>
|
|
82
|
-
<%= pb_rails("table/table_header", props: { text: "Branch" }) %>
|
|
83
|
-
<%= pb_rails("table/table_header", props: { text: "Start Date", text_align: "right" }) %>
|
|
84
|
-
<% end %>
|
|
85
|
-
<% end %>
|
|
86
|
-
|
|
87
|
-
<%= pb_rails("table/table_body") do %>
|
|
88
|
-
<% users.each do |user| %>
|
|
89
|
-
<%= pb_rails("table/table_row") do %>
|
|
90
|
-
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" }, number_spacing: "tabular" }) { user[:id].to_s } %>
|
|
91
|
-
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:name] } %>
|
|
92
|
-
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:title] } %>
|
|
93
|
-
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:department] } %>
|
|
94
|
-
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:branch] } %>
|
|
95
|
-
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) do %>
|
|
96
|
-
<%= pb_rails("date", props: {alignment: "right", date: user[:start_date].to_s, show_current_year: true } ) %>
|
|
97
|
-
<% end %>
|
|
98
|
-
<% end %>
|
|
99
|
-
<% end %>
|
|
100
|
-
<% end %>
|
|
101
|
-
<% end %>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
Set the `variant` prop to `with_filter` to render a Table with a filter. The variant automatically handles:
|
|
2
|
-
|
|
3
|
-
- Card wrapper with standard responsive margins
|
|
4
|
-
- Optional `title` prop to render title above the card
|
|
5
|
-
- Filter component rendering with Design defaults
|
|
6
|
-
- SectionSeparator between filter and table
|
|
7
|
-
- Flex layout for proper alignment
|
|
8
|
-
|
|
9
|
-
#### Required Props
|
|
10
|
-
|
|
11
|
-
- `variant: "with_filter"`: Enables the filter variant
|
|
12
|
-
- `filter_content`: The filter's body content (inputs, buttons, etc.) built with `pb_rails` string concatenation
|
|
13
|
-
- `filter_props`: A hash containing Filter-specific props like `results`, `sort_menu`, etc.
|
|
14
|
-
|
|
15
|
-
#### Optional Props
|
|
16
|
-
|
|
17
|
-
- `title`: Displays a title above the card
|
|
18
|
-
- All standard Table props (`size`, `collapse`, etc.) can be used, but defaults are already set to match Design guidelines
|
|
19
|
-
|
|
20
|
-
#### Default Filter Props
|
|
21
|
-
|
|
22
|
-
The Table kit automatically sets these Filter defaults (which you can override via `filter_props`):
|
|
23
|
-
|
|
24
|
-
- `background: false`
|
|
25
|
-
- `max_height: "50vh"`
|
|
26
|
-
- `min_width: "xs"`
|
|
27
|
-
- `popover_props: { width: "350px" }`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**IMPORTANT NOTE**:
|
|
31
|
-
The purpose of this variant is to provide an easy way to set up a Table with a Filter with Design standards applied by default.
|
|
32
|
-
|
|
33
|
-
If you are looking for more customization than this embedded variant provides, you may be better served by using the individual kits as demonstrating in our Table Filter Card Building Block as seen [here](https://playbook.powerapp.cloud/building_blocks/table_filter_card/rails).
|