playbook_ui 14.18.0.pre.alpha.play2042addturbosupporttopopoverkit7423 → 14.18.0.pre.alpha.play2087emptystatekitbuildrails7533

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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +304 -21
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +5 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +6 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +0 -6
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +80 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +3 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +58 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +3 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +5 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.jsx → _advanced_table_selectable_rows_no_subrows_react.jsx} +2 -2
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +3 -2
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -5
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -2
  15. data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +106 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/index.js +228 -11
  17. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +9 -1
  18. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -3
  19. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +1 -2
  20. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.html.erb +2 -2
  21. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +43 -0
  22. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +55 -0
  23. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +1 -0
  24. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +2 -1
  25. data/app/pb_kits/playbook/pb_draggable/draggable.rb +9 -1
  26. data/app/pb_kits/playbook/pb_draggable/index.js +139 -142
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +5 -2
  28. data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +7 -1
  29. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.html.erb +30 -0
  30. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.html.erb +8 -0
  31. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.html.erb +13 -0
  32. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.html.erb +23 -0
  33. data/app/pb_kits/playbook/pb_empty_state/docs/example.yml +5 -1
  34. data/app/pb_kits/playbook/pb_empty_state/empty_state.html.erb +24 -0
  35. data/app/pb_kits/playbook/pb_empty_state/empty_state.rb +123 -0
  36. data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +22 -18
  37. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
  38. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
  39. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
  40. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
  41. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +110 -0
  42. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +13 -0
  43. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +3 -1
  44. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +10 -0
  45. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +20 -0
  46. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +1 -0
  47. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +2 -0
  48. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
  49. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +3 -0
  50. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +19 -0
  51. data/app/pb_kits/playbook/pb_select/_select.scss +10 -0
  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 +5 -1
  55. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb +8 -1
  56. data/dist/chunks/{_typeahead-COZRQUuU.js → _typeahead-D8CsVBZO.js} +2 -2
  57. data/dist/chunks/_weekday_stacked-D3oLTSkH.js +45 -0
  58. data/dist/chunks/{lib-ClNg0TLS.js → lib-BmTAc7Nc.js} +1 -1
  59. data/dist/chunks/{pb_form_validation-Btrgnox1.js → pb_form_validation-BWjy4bFn.js} +1 -1
  60. data/dist/chunks/vendor.js +1 -1
  61. data/dist/menu.yml +1 -1
  62. data/dist/playbook-doc.js +1 -1
  63. data/dist/playbook-rails-react-bindings.js +1 -1
  64. data/dist/playbook-rails.js +1 -1
  65. data/dist/playbook.css +1 -1
  66. data/lib/playbook/version.rb +1 -1
  67. metadata +32 -12
  68. data/dist/chunks/_weekday_stacked-BRT0ul9R.js +0 -45
  69. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_react.md → _advanced_table_selectable_rows.md} +0 -0
  70. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.html.erb → _advanced_table_selectable_rows_no_subrows_rails.html.erb} +0 -0
  71. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.html.erb → _advanced_table_selectable_rows_rails.html.erb} +0 -0
  72. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_colors.md → _draggable_drop_zones_colors_react.md} +0 -0
  73. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones.md → _draggable_drop_zones_react.md} +0 -0
@@ -23,35 +23,39 @@
23
23
  @mixin error-state-right-side-select-kit {
24
24
  &:has(.pb_text_input_kit:not(.error)):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper.error),
25
25
  &:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper) {
26
- align-items: flex-start;
27
-
28
- .pb_select_kit_wrapper {
29
- padding-top: $space_md;
30
- margin-top: 2px;
26
+ &:not(:has(.pb_phone_number_input)) {
27
+ align-items: flex-start;
31
28
 
32
- .pb_select_kit_caret {
29
+ .pb_select_kit_wrapper {
33
30
  padding-top: $space_md;
31
+ margin-top: 2px;
32
+
33
+ .pb_select_kit_caret {
34
+ padding-top: $space_md;
35
+ }
34
36
  }
35
- }
36
37
 
37
- .pb_select_kit_wrapper.error {
38
- padding-top: $space_md;
39
- margin-top: 2px;
38
+ .pb_select_kit_wrapper.error {
39
+ padding-top: $space_md;
40
+ margin-top: 2px;
40
41
 
41
- .pb_select_kit_caret {
42
- padding-top: $space_xl;
42
+ .pb_select_kit_caret {
43
+ padding-top: $space_xl;
44
+ }
43
45
  }
44
46
  }
45
47
  }
46
48
  }
47
49
 
48
50
  @mixin error-state-left-side-select-kit {
49
- &:has(.pb_select_kit_label):has(.pb_select_kit_wrapper):has(.pb_phone_number_input):has(.pb_text_input_kit.error) {
50
- align-items: flex-start;
51
+ &:has(.pb_select_kit_label):has(.pb_select_kit_wrapper):has(.pb_text_input_kit.error) {
52
+ &:not(:has(.pb_phone_number_input)) {
53
+ align-items: flex-start;
51
54
 
52
- .pb_text_input_kit.error {
53
- padding-top: $space_md;
54
- margin-top: 2px;
55
+ .pb_text_input_kit.error {
56
+ padding-top: $space_md;
57
+ margin-top: 2px;
58
+ }
55
59
  }
56
60
  }
57
- }
61
+ }
@@ -0,0 +1,52 @@
1
+ import React from 'react'
2
+ import lineGraphTheme from '../lineGraphTheme'
3
+ import Highcharts from "highcharts"
4
+ import HighchartsReact from "highcharts-react-official"
5
+
6
+ const data = [{
7
+ name: 'Installation',
8
+ data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
9
+ }, {
10
+ name: 'Manufacturing',
11
+ data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
12
+ }, {
13
+ name: 'Sales & Distribution',
14
+ data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
15
+ }, {
16
+ name: 'Project Development',
17
+ data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
18
+ }, {
19
+ name: 'Other',
20
+ data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
21
+ }]
22
+
23
+ const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
24
+
25
+ const baseOptions = {
26
+ series: data,
27
+ title: { text: "Solar Employment Growth by Sector, 2010-2016" },
28
+ subtitle: { text: "Source: thesolarfoundation.com" },
29
+ xAxis: {
30
+ categories: categories,
31
+ },
32
+ yAxis: {
33
+ title: {
34
+ text: "Number of Employees",
35
+ },
36
+ },
37
+ }
38
+
39
+ const LineGraphPbStyles = () => {
40
+ const options = Highcharts.merge({}, lineGraphTheme, baseOptions)
41
+
42
+ return(
43
+ <div>
44
+ <HighchartsReact
45
+ highcharts={Highcharts}
46
+ options={options}
47
+ />
48
+ </div>
49
+ )
50
+ }
51
+
52
+ export default LineGraphPbStyles
@@ -0,0 +1 @@
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.
@@ -11,6 +11,7 @@ examples:
11
11
 
12
12
  react:
13
13
  - line_graph_default: Default
14
+ - line_graph_pb_styles: Playbook Styles
14
15
  - line_graph_legend: Legend
15
16
  - line_graph_legend_position: Legend Position
16
17
  - line_graph_legend_nonclickable: Legend Nonclickable
@@ -4,3 +4,4 @@ export { default as LineGraphLegendPosition } from './_line_graph_legend_positio
4
4
  export { default as LineGraphLegendNonclickable } from './_line_graph_legend_nonclickable.jsx'
5
5
  export { default as LineGraphHeight } from './_line_graph_height.jsx'
6
6
  export { default as LineGraphColors } from './_line_graph_colors.jsx'
7
+ export { default as LineGraphPbStyles } from './_line_graph_pb_styles.jsx'
@@ -0,0 +1,110 @@
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;
@@ -39,6 +39,9 @@ $flag-min-resolution: 192dpi;
39
39
  color: $charcoal;
40
40
  }
41
41
 
42
+ .iti__country-list {
43
+ min-width: $dropdown-min-width;
44
+ }
42
45
  // iti-spacer-horizontal's default is 8px, or $space_xs
43
46
  .iti__country-list .iti__flag, .iti__country-name {
44
47
  margin-right: $space_xs;
@@ -227,6 +230,16 @@ $flag-min-resolution: 192dpi;
227
230
  .iti__dropdown-content {
228
231
  border-radius: $space_xs;
229
232
  border: 1px solid $border_dark !important;
233
+ .iti__search-input {
234
+ background-color: $bg_dark_card;
235
+ &:hover {
236
+ background-color: $bg_dark_card;
237
+ }
238
+ &:active,
239
+ &:focus {
240
+ background-color: $card_dark;
241
+ }
242
+ }
230
243
  }
231
244
 
232
245
  .iti__divider {
@@ -37,6 +37,7 @@ type PhoneNumberInputProps = {
37
37
  required?: boolean,
38
38
  value?: string,
39
39
  formatAsYouType?: boolean,
40
+ countrySearch?: boolean,
40
41
  }
41
42
 
42
43
  enum ValidationError {
@@ -91,6 +92,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
91
92
  preferredCountries = [],
92
93
  value = "",
93
94
  formatAsYouType = false,
95
+ countrySearch = false,
94
96
  } = props
95
97
 
96
98
  const ariaProps = buildAriaProps(aria)
@@ -242,7 +244,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
242
244
  autoInsertDialCode: false,
243
245
  initialCountry: initialCountry || fallbackCountry,
244
246
  onlyCountries,
245
- countrySearch: false,
247
+ countrySearch: countrySearch,
246
248
  fixDropdownWidth: false,
247
249
  formatAsYouType: formatAsYouType,
248
250
  hiddenInput: hiddenInputs ? () => ({
@@ -0,0 +1,10 @@
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
+ }) %>
@@ -0,0 +1,20 @@
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
@@ -0,0 +1 @@
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.
@@ -9,6 +9,7 @@ examples:
9
9
  - phone_number_input_clear_field: Clearing the Input Field
10
10
  - phone_number_input_access_input_element: Accessing the Input Element
11
11
  - phone_number_input_format: Format as You Type
12
+ - phone_number_input_country_search: Country Search
12
13
 
13
14
  rails:
14
15
  - phone_number_input_default: Default
@@ -18,4 +19,5 @@ examples:
18
19
  - phone_number_input_validation: Form Validation
19
20
  - phone_number_input_format: Format as You Type
20
21
  - phone_number_input_hidden_inputs: Hidden Inputs
22
+ - phone_number_input_country_search: Country Search
21
23
 
@@ -6,3 +6,4 @@ export { default as PhoneNumberInputValidation } from './_phone_number_input_val
6
6
  export { default as PhoneNumberInputClearField } from './_phone_number_input_clear_field'
7
7
  export { default as PhoneNumberInputAccessInputElement } from './_phone_number_input_access_input_element'
8
8
  export { default as PhoneNumberInputFormat } from './_phone_number_input_format'
9
+ export { default as PhoneNumberInputCountrySearch } from './_phone_number_input_country_search'
@@ -25,6 +25,8 @@ module Playbook
25
25
  default: false
26
26
  prop :hidden_inputs, type: Playbook::Props::Boolean,
27
27
  default: false
28
+ prop :country_search, type: Playbook::Props::Boolean,
29
+ default: false
28
30
 
29
31
  def classname
30
32
  generate_classname("pb_phone_number_input")
@@ -45,6 +47,7 @@ module Playbook
45
47
  preferredCountries: preferred_countries,
46
48
  required: required,
47
49
  value: value,
50
+ countrySearch: country_search,
48
51
  }
49
52
  end
50
53
  end
@@ -139,3 +139,22 @@ test("should format phone number as '555-555-5555' with formatAsYouType and 'us'
139
139
 
140
140
  expect(input.value).toBe("555-555-5555");
141
141
  });
142
+
143
+ test("should pass countrySearch prop to component", () => {
144
+ window.intlTelInput = jest.fn(() => ({
145
+ getSelectedCountryData: jest.fn(() => ({})),
146
+ isValidNumber: jest.fn(() => true),
147
+ getValidationError: jest.fn(() => 0),
148
+ }));
149
+
150
+ const props = {
151
+ id: testId,
152
+ countrySearch: true,
153
+ data: { testid: 'phone-input-with-search' }
154
+ };
155
+
156
+ render(<PhoneNumberInput {...props} />);
157
+
158
+ const wrapper = screen.getByTestId('phone-input-with-search');
159
+ expect(wrapper).toBeInTheDocument();
160
+ });
@@ -143,6 +143,16 @@
143
143
  select {
144
144
  font-size: 12px;
145
145
  }
146
+ .pb_select_kit_wrapper.error {
147
+ .pb_select_kit_caret {
148
+ top: 13.7px;
149
+ }
150
+ }
151
+ }
152
+ .pb_select_kit_wrapper.error {
153
+ .pb_select_kit_caret {
154
+ top: 16.2px;
155
+ }
146
156
  }
147
157
  }
148
158
  }
@@ -1,5 +1,5 @@
1
1
  <%= pb_rails("select", props: {
2
- error: "Please make a valid selection",
2
+ error: raw(pb_rails("icon", props: { icon: "warning" }) + " Please make a valid selection"),
3
3
  label: "Favorite Food",
4
4
  name: "food",
5
5
  options: [
@@ -4,7 +4,7 @@
4
4
  border: true,
5
5
  icon: "user"
6
6
  },
7
- error: "Please enter a valid email address",
7
+ error: raw(pb_rails("icon", props: { icon: "warning" }) + " Please enter a valid email address"),
8
8
  label: "Email Address",
9
9
  placeholder: "Enter email address",
10
10
  type: "email"
@@ -1 +1,5 @@
1
- <%= pb_rails("textarea", props: { error: "This field has an error!", label: "Label", rows: 4}) %>
1
+ <%= pb_rails("textarea", props: {
2
+ error: raw(pb_rails("icon", props: { icon: "warning" }) + " This field has an error!"),
3
+ label: "Label",
4
+ rows: 4
5
+ }) %>
@@ -8,7 +8,14 @@
8
8
 
9
9
  %>
10
10
 
11
- <%= pb_rails("typeahead", props: { id: "typeahead-error-example", options: options, error: "Please make a valid selection", label: "Products", name: :foo, is_multi: false }) %>
11
+ <%= pb_rails("typeahead", props: {
12
+ id: "typeahead-error-example",
13
+ options: options,
14
+ error: "Please make a valid selection",
15
+ label: "Products",
16
+ name: :foo,
17
+ is_multi: false
18
+ }) %>
12
19
 
13
20
  <!-- This section is an example of the available JavaScript event hooks -->
14
21
  <%= javascript_tag defer: "defer" do %>