playbook_ui 14.18.0.pre.alpha.dropdownautocomplete7493 → 14.18.0.pre.alpha.play1736highchartslinegraphdefaultrebuild7431

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.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +21 -304
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +1 -5
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -6
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +6 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows_react.jsx → _advanced_table_selectable_rows_no_subrows.jsx} +2 -2
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -5
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +2 -3
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +5 -6
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -3
  11. data/app/pb_kits/playbook/pb_advanced_table/index.js +11 -228
  12. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -9
  13. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +3 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -1
  15. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.html.erb +2 -2
  16. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -2
  17. data/app/pb_kits/playbook/pb_draggable/draggable.rb +1 -9
  18. data/app/pb_kits/playbook/pb_draggable/index.js +142 -139
  19. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -5
  20. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +16 -5
  21. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +2 -5
  22. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +64 -17
  23. data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_autocomplete_with_subcomponents.jsx → _dropdown_with_autocomplete_and_custom_display.jsx} +25 -11
  24. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.md +1 -0
  25. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx +79 -0
  26. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +4 -7
  27. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -2
  28. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +2 -2
  29. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +0 -4
  30. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -45
  31. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +0 -10
  32. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +0 -3
  33. data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +2 -12
  34. data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.rb +1 -3
  35. data/app/pb_kits/playbook/pb_dropdown/index.js +0 -57
  36. data/app/pb_kits/playbook/pb_dropdown/keyboard_accessibility.js +0 -26
  37. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +2 -1
  38. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +4 -4
  39. data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -1
  40. data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +18 -22
  41. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +1 -1
  42. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.js +49 -0
  43. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +0 -13
  44. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -3
  45. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
  46. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  47. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
  48. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +0 -19
  49. data/app/pb_kits/playbook/pb_popover/docs/example.yml +0 -1
  50. data/app/pb_kits/playbook/pb_popover/index.ts +1 -13
  51. data/app/pb_kits/playbook/pb_popover/popover.rb +0 -2
  52. data/app/pb_kits/playbook/pb_select/docs/_select_error.html.erb +1 -1
  53. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb +1 -1
  54. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb +1 -5
  55. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb +1 -8
  56. data/dist/chunks/{_typeahead-D8CsVBZO.js → _typeahead-0GuhDCLl.js} +2 -2
  57. data/dist/chunks/_weekday_stacked-DGgA3ilU.js +45 -0
  58. data/dist/chunks/{lib-BmTAc7Nc.js → lib-C8GLwWXp.js} +1 -1
  59. data/dist/chunks/{pb_form_validation-BWjy4bFn.js → pb_form_validation-Eul4XODx.js} +1 -1
  60. data/dist/chunks/vendor.js +1 -1
  61. data/dist/playbook-doc.js +1 -1
  62. data/dist/playbook-rails-react-bindings.js +1 -1
  63. data/dist/playbook-rails.js +1 -1
  64. data/dist/playbook.css +1 -1
  65. data/lib/playbook/version.rb +1 -1
  66. metadata +16 -38
  67. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +0 -80
  68. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +0 -3
  69. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +0 -58
  70. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +0 -3
  71. data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +0 -106
  72. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +0 -43
  73. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +0 -55
  74. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +0 -1
  75. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.html.erb +0 -28
  76. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.html.erb +0 -58
  77. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.md +0 -1
  78. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.md +0 -1
  79. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.jsx +0 -61
  80. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.md +0 -2
  81. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.html.erb +0 -52
  82. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.md +0 -2
  83. data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.html.erb +0 -41
  84. data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md +0 -1
  85. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +0 -1
  86. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +0 -110
  87. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +0 -10
  88. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +0 -20
  89. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +0 -1
  90. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +0 -46
  91. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md +0 -1
  92. data/dist/chunks/_weekday_stacked-Da8b-KUp.js +0 -45
  93. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_rails.html.erb → _advanced_table_selectable_rows.html.erb} +0 -0
  94. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows_rails.html.erb → _advanced_table_selectable_rows_no_subrows.html.erb} +0 -0
  95. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
  96. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_react.md → _draggable_drop_zones.md} +0 -0
  97. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_colors_react.md → _draggable_drop_zones_colors.md} +0 -0
@@ -1,61 +0,0 @@
1
- import React, { useState } from 'react'
2
- import Dropdown from '../../pb_dropdown/_dropdown'
3
- import IconCircle from '../../pb_icon_circle/_icon_circle';
4
-
5
- const DropdownWithSearch = (props) => {
6
- const [selectedOption, setSelectedOption] = useState();
7
-
8
- const options = [
9
- {
10
- label: "United States",
11
- value: "United States",
12
- icon: "🇺🇸",
13
- id: "United-states"
14
-
15
- },
16
- {
17
- label: "United Kingdom",
18
- value: "United Kingdom",
19
- icon: "🇬🇧",
20
- id: "united-kingdom"
21
- },
22
- {
23
- label: "Pakistan",
24
- value: "Pakistan",
25
- icon: "🇵🇰",
26
- id: "pakistan"
27
- }
28
- ];
29
-
30
-
31
- return (
32
- <div>
33
- <Dropdown
34
- onSelect={(selectedItem) => setSelectedOption(selectedItem)}
35
- options={options}
36
- {...props}
37
- >
38
- <Dropdown.Trigger>
39
- <div key={selectedOption ? selectedOption.icon : "flag"}>
40
- <IconCircle
41
- cursor="pointer"
42
- icon={selectedOption ? selectedOption.icon : "flag"}
43
- variant="royal"
44
- />
45
- </div>
46
- </Dropdown.Trigger>
47
- <Dropdown.Container maxWidth="xs"
48
- searchbar
49
- >
50
- {options.map((option) => (
51
- <Dropdown.Option key={option.id}
52
- option={option}
53
- />
54
- ))}
55
- </Dropdown.Container>
56
- </Dropdown>
57
- </div>
58
- )
59
- }
60
-
61
- export default DropdownWithSearch
@@ -1,2 +0,0 @@
1
- The optional `searchbar` boolean prop can also be used on the `Dropdown.Container` to render a searchbar with typeahead functionality within the dropdown itself. This is especially useful when a custom trigger is being used.
2
- `searchbar` is set to false by default.
@@ -1,52 +0,0 @@
1
- <%
2
- options = [
3
- {
4
- label: "United States",
5
- value: "United States",
6
- areaCode: "+1",
7
- icon: "🇺🇸",
8
- id: "us"
9
- },
10
- {
11
- label: "United Kingdom",
12
- value: "United Kingdom",
13
- areaCode: "+44",
14
- icon: "🇬🇧",
15
- id: "gb"
16
- },
17
- {
18
- label: "Pakistan",
19
- value: "Pakistan",
20
- areaCode: "+92",
21
- icon: "🇵🇰",
22
- id: "pk"
23
- }
24
- ]
25
-
26
- %>
27
-
28
- <%= pb_rails("dropdown", props: {options: options}) do %>
29
- <%= pb_rails("dropdown/dropdown_trigger") do %>
30
- <%= pb_rails("icon_circle", props: {icon:"flag", cursor: "pointer", variant:"royal"}) %>
31
- <% end %>
32
- <%= pb_rails("dropdown/dropdown_container", props:{max_width:"xs", searchbar: true}) do %>
33
- <% options.each do |option| %>
34
- <%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
35
- <%= pb_rails("flex", props: {
36
- align: "center",
37
- justify: "between",
38
- }) do %>
39
- <%= pb_rails("flex/flex_item") do %>
40
- <%= pb_rails("flex") do %>
41
- <%= pb_rails("icon", props: {icon: option[:icon]}) %>
42
- <%= pb_rails("body", props: {text: option[:label], padding_left:"xs"}) %>
43
- <% end %>
44
- <% end %>
45
- <%= pb_rails("flex/flex_item") do %>
46
- <%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
47
- <% end %>
48
- <% end %>
49
- <% end %>
50
- <% end %>
51
- <% end %>
52
- <% end %>
@@ -1,2 +0,0 @@
1
- The optional `searchbar` boolean prop can also be used on the `dropdown/dropdown_container` to render a searchbar with typeahead functionality within the dropdown itself. This is especially useful when a custom trigger is being used.
2
- `searchbar` is set to false by default.
@@ -1,41 +0,0 @@
1
- <%=
2
- pb_rails("filter", props: {
3
- id: "filter_within_trubo_frames",
4
- position: "top",
5
- filters: [
6
- { name: "name", value: "John Wick" },
7
- { name: "city", value: "San Francisco"}
8
- ],
9
- sort_menu: [
10
- { item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
11
- { item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
12
- { item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
13
- ],
14
- template: "default",
15
- results: 1,
16
- popover_props: { append_to: "parent" },
17
- }) do
18
- %>
19
- <%
20
- example_collection = [
21
- OpenStruct.new(name: "USA", value: 1),
22
- OpenStruct.new(name: "Canada", value: 2),
23
- OpenStruct.new(name: "Brazil", value: 3),
24
- OpenStruct.new(name: "Philippines", value: 4),
25
- OpenStruct.new(name: "A galaxy far far away, like really far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far away...", value: 5)
26
- ]
27
- %>
28
- <%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
29
- <%= form.text_field :example_text_field, props: { label: true } %>
30
- <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: {max_width: "sm", label: true } %>
31
-
32
- <%= form.actions do |action| %>
33
- <%= action.submit props: {
34
- text: "Apply",
35
- data: {
36
- disable_with: "pb_rails('icon', props: { icon: 'spinner', spin: true, fixed_width: true })Searching...".html_safe
37
- },}%>
38
- <%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
39
- <% end %>
40
- <% end %>
41
- <% end %>
@@ -1 +0,0 @@
1
- By default, the filter popover attaches to the `<body>`. To attach it elsewhere, like inside a Turbo Frame, pass the `append_to` prop through `popover_props`. Set it to `"parent"` to place the tooltip inside its parent element, or pass any CSS selector (`#id` or `.class`) to specify a custom container.
@@ -1 +0,0 @@
1
- You don't need to use the Line Graph Kit to apply Playbook styles to your Highcharts line graph. Just import lineGraphTheme.ts and merge it with your graph options—Playbook’s styling will apply automatically.
@@ -1,110 +0,0 @@
1
- import colors from '../tokens/exports/_colors.module.scss'
2
- import typography from '../tokens/exports/_typography.module.scss'
3
-
4
- const lineGraphTheme = {
5
- title: {
6
- text: "",
7
- style: {
8
- color: colors.text_lt_default,
9
- fontFamily: typography.font_family_base,
10
- fontWeight: typography.bold,
11
- fontSize: typography.heading_3,
12
- },
13
- },
14
- subtitle: {
15
- text: "" ,
16
- style: {
17
- fontFamily: typography.font_family_base,
18
- color: colors.text_lt_light,
19
- fontWeight: typography.regular,
20
- fontSize: typography.text_base,
21
- },
22
- },
23
- chart: {
24
- type: "line",
25
- },
26
- tooltip: {
27
- backgroundColor: {
28
- linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
29
- stops: [
30
- [0, colors.bg_dark],
31
- [1, colors.bg_dark],
32
- ],
33
- },
34
- followPointer: true,
35
- shadow: false,
36
- borderWidth: 0,
37
- borderRadius: 10,
38
- style: {
39
- fontFamily: typography.font_family_base,
40
- color: colors.text_dk_default,
41
- fontWeight: typography.regular,
42
- fontSize: typography.text_smaller,
43
- },
44
- },
45
- plotOptions: {
46
- line: {
47
- dataLabels: {
48
- enabled: false,
49
- },
50
- },
51
- },
52
- credits: { enabled: false },
53
- legend: { enabled: false },
54
- colors: [
55
- colors.data_1,
56
- colors.data_2,
57
- colors.data_3,
58
- colors.data_4,
59
- colors.data_5,
60
- colors.data_6,
61
- colors.data_7,
62
- ],
63
- xAxis: {
64
- gridLineWidth: 0,
65
- lineColor: colors.border_light,
66
- tickColor: colors.border_light,
67
- labels: {
68
- style: {
69
- fontFamily: typography.font_family_base,
70
- color: colors.text_lt_lighter,
71
- fontWeight: typography.bold,
72
- fontSize: typography.text_smaller,
73
- },
74
- },
75
- title: {
76
- style: {
77
- color: colors.text_lt_default,
78
- fontFamily: typography.font_family_base,
79
- fontWeight: typography.regular,
80
- fontSize: typography.heading_4,
81
- },
82
- },
83
- },
84
- yAxis: {
85
- alternateGridColor: undefined as string | undefined,
86
- minorTickInterval: null as number | null,
87
- gridLineColor: colors.border_light,
88
- minorGridLineColor: colors.border_light,
89
- lineWidth: 0,
90
- tickWidth: 0,
91
- labels: {
92
- style: {
93
- fontFamily: typography.font_family_base,
94
- color: colors.text_lt_lighter,
95
- fontWeight: typography.bold,
96
- fontSize: typography.text_smaller,
97
- },
98
- },
99
- title: {
100
- style: {
101
- fontFamily: typography.font_family_base,
102
- color: colors.text_lt_lighter,
103
- fontWeight: typography.bold,
104
- fontSize: typography.text_smaller,
105
- },
106
- },
107
- },
108
- }
109
-
110
- export default lineGraphTheme;
@@ -1,10 +0,0 @@
1
- <%= pb_rails("phone_number_input", props: {
2
- country_search: true,
3
- id: "country-search",
4
- }) %>
5
-
6
- <%= pb_rails("phone_number_input", props: {
7
- country_search: true,
8
- id: "country-search-limited",
9
- only_countries: ["br", "us", "ph", "gb"],
10
- }) %>
@@ -1,20 +0,0 @@
1
- import React from 'react'
2
- import PhoneNumberInput from '../_phone_number_input'
3
-
4
- const PhoneNumberInputCountrySearch = (props) => (
5
- <>
6
- <PhoneNumberInput
7
- countrySearch
8
- id='country-search'
9
- {...props}
10
- />
11
- <PhoneNumberInput
12
- countrySearch
13
- id='country-search-limited'
14
- onlyCountries={["br", "us", "ph", "gb"]}
15
- {...props}
16
- />
17
- </>
18
- )
19
-
20
- export default PhoneNumberInputCountrySearch
@@ -1 +0,0 @@
1
- Set `country_search` / `countrySearch` to true to allow users to search for a specific Country within the dropdown. If the range of countries has been limited, only the selected countries will be searchable.
@@ -1,46 +0,0 @@
1
- <%= pb_rails("flex", props: {
2
- dark: true,
3
- orientation: "row",
4
- vertical: "center",
5
- margin_bottom: "md"
6
- }) do %>
7
- <%= pb_rails("body", props: { text: "Click info for more details" }) %>
8
- &nbsp;
9
- <%= pb_rails("circle_icon_button", props: {
10
- variant: "secondary",
11
- icon: "info",
12
- id: "append-to-popover-1"
13
- }) %>
14
- <%= pb_rails("popover", props: {
15
- trigger_element_id: "append-to-popover-1",
16
- tooltip_id: "append-to-tooltip-1",
17
- offset: true,
18
- position: "top",
19
- append_to: "parent",
20
- }) do %>
21
- I'm a popover. I have been appended to my parent element.
22
- <% end %>
23
- <% end %>
24
-
25
- <%= pb_rails("flex", props: {
26
- dark: true,
27
- orientation: "row",
28
- vertical: "center"
29
- }) do %>
30
- <%= pb_rails("body", props: { text: "Click info for more details" }) %>
31
- &nbsp;
32
- <%= pb_rails("circle_icon_button", props: {
33
- variant: "secondary",
34
- icon: "info",
35
- id: "append-to-popover-2"
36
- }) %>
37
- <%= pb_rails("popover", props: {
38
- trigger_element_id: "append-to-popover-2",
39
- tooltip_id: "append-to-tooltip-2",
40
- offset: true,
41
- position: "top",
42
- append_to: ".kit-show-wrapper",
43
- }) do %>
44
- I'm a popover. I have been appended to the .kit-show-wrapper.
45
- <% end %>
46
- <% end %>
@@ -1 +0,0 @@
1
- By default, the popover tooltip attaches to the `<body>`. To attach it elsewhere, use the `append_to` prop. Set it to `"parent"` to place the tooltip inside its parent element, or pass any CSS selector (`#id` or `.class`) to specify a custom container.