playbook_ui 17.0.0.pre.alpha.testdist18493 → 17.0.0.pre.alpha.typeaheadchunks18358

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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_button/docs/_button_reaction.html.erb +1 -1
  3. data/app/pb_kits/playbook/pb_button/docs/_button_reaction.jsx +1 -1
  4. data/app/pb_kits/playbook/pb_button/docs/_button_reaction.md +1 -1
  5. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.html.erb +1 -1
  6. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.jsx +4 -1
  7. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_required_indicator.html.erb +1 -1
  8. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_required_indicator.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +1 -1
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +4 -1
  11. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_error.html.erb +1 -1
  12. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_error.jsx +6 -1
  13. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_button.jsx +34 -51
  14. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_date_picker.jsx +18 -28
  15. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_default.jsx +25 -47
  16. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_full_width.jsx +40 -69
  17. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +0 -7
  18. data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.html.erb +7 -6
  19. data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.md +1 -1
  20. data/app/pb_kits/playbook/pb_icon/icon.html.erb +1 -1
  21. data/app/pb_kits/playbook/pb_icon/icon.rb +17 -41
  22. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_emoji.html.erb +3 -3
  23. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_emoji.jsx +2 -2
  24. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_emoji.md +1 -1
  25. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +1 -1
  26. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.md +1 -1
  27. data/app/pb_kits/playbook/pb_multi_level_select/index.js +59 -779
  28. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -117
  29. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +20 -50
  30. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx +0 -365
  31. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +17 -7
  32. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +2 -1
  33. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.html.erb +1 -14
  34. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +8 -11
  35. data/app/pb_kits/playbook/pb_select/_select.scss +0 -6
  36. data/app/pb_kits/playbook/pb_select/docs/_select_error.html.erb +1 -1
  37. data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +7 -2
  38. data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_custom.html.erb +3 -3
  39. data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_custom.md +1 -1
  40. data/app/pb_kits/playbook/pb_table/_table.tsx +0 -4
  41. data/app/pb_kits/playbook/pb_table/docs/_playground.json +0 -2
  42. data/app/pb_kits/playbook/pb_table/docs/_playground.overrides.json +1 -1
  43. data/app/pb_kits/playbook/pb_table/docs/_sections.yml +0 -1
  44. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx +2 -1
  45. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx +2 -1
  46. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_with_card_title_props.jsx +2 -1
  47. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
  48. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  49. data/app/pb_kits/playbook/pb_table/kit.schema.json +0 -8
  50. data/app/pb_kits/playbook/pb_table/styles/_all.scss +1 -2
  51. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +2 -2
  52. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +3 -3
  53. data/app/pb_kits/playbook/pb_table/styles/_hover.scss +2 -2
  54. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +2 -2
  55. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +2 -2
  56. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +2 -2
  57. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +2 -2
  58. data/app/pb_kits/playbook/pb_table/styles/_structure.scss +1 -1
  59. data/app/pb_kits/playbook/pb_table/styles/_table-card.scss +2 -2
  60. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +2 -2
  61. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +9 -9
  62. data/app/pb_kits/playbook/pb_table/table.rb +1 -7
  63. data/app/pb_kits/playbook/pb_table/table.test.js +0 -5
  64. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb +1 -1
  65. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +8 -1
  66. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb +1 -1
  67. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +7 -1
  68. data/app/pb_kits/playbook/pb_typeahead/docs/_description_react.md +8 -0
  69. data/app/pb_kits/playbook/pb_typeahead/docs/_playground.json +3 -0
  70. data/app/pb_kits/playbook/pb_typeahead/docs/_playground.overrides.json +3 -0
  71. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills.jsx +2 -1
  72. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +6 -2
  73. data/app/pb_kits/playbook/pb_typeahead/kit.schema.json +1 -1
  74. data/dist/chunks/_circle_icon_button-D_qUpPl0.js +1 -0
  75. data/dist/chunks/{_detail-BQ0fCaZT.js → _detail-DMv3cB5m.js} +2 -2
  76. data/dist/chunks/{_pb_line_graph-nUF-f93L.js → _pb_line_graph-BzOw6TAq.js} +1 -1
  77. data/dist/chunks/_phone_number_input-h64UsK7Q.js +1 -0
  78. data/dist/chunks/_table-iw9usfZv.js +1 -0
  79. data/dist/chunks/_typeahead-DdW5tQpN.js +1 -0
  80. data/dist/chunks/_user-DhP26FMk.js +1 -0
  81. data/dist/chunks/{globalProps-BrVUCoIB.js → globalProps-D22OGr_2.js} +1 -1
  82. data/dist/chunks/{lib-D0T1C_Ym.js → lib-TNE5C4ML.js} +1 -1
  83. data/dist/chunks/time_picker_helper-Bx8nzyM8.js +1 -0
  84. data/dist/chunks/vendor.js +3 -3
  85. data/dist/menu.yml +4 -4
  86. data/dist/playbook-rails-react-bindings.js +1 -1
  87. data/dist/playbook-rails.js +1 -1
  88. data/dist/playbook.css +1 -1
  89. data/lib/playbook/version.rb +1 -1
  90. metadata +13 -16
  91. data/app/pb_kits/playbook/pb_multi_level_select/tree_helpers.js +0 -266
  92. data/app/pb_kits/playbook/pb_phone_number_input/index.ts +0 -438
  93. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input_enhanced.test.js +0 -225
  94. data/app/pb_kits/playbook/pb_table/docs/_table_contrast_border.html.erb +0 -71
  95. data/app/pb_kits/playbook/pb_table/docs/_table_contrast_border.jsx +0 -93
  96. data/app/pb_kits/playbook/pb_table/docs/_table_contrast_border.md +0 -1
  97. data/app/pb_kits/playbook/pb_table/styles/_contrast_border.scss +0 -87
  98. data/dist/chunks/_table-BYW_yPh_.js +0 -1
  99. data/dist/chunks/_typeahead-Du7B3pT3.js +0 -1
  100. data/dist/chunks/time_picker_helper-DpOayLkm.js +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75c30864b0f1b7943190e209e08489c69c5cd258ea94b0d52d00083af516bcc0
4
- data.tar.gz: 309820ac1e475e9a4f1e786809fba6f26bb118d0949f9259a97b804e5e5c66b5
3
+ metadata.gz: 00e2aebc58d4b9b6ae04a2e367ebe3f6c01ae2cc6ad86972ddf23421245b7e02
4
+ data.tar.gz: 9c2e5b7de2c12dfca40f9f1e8c9892f26822f0e88b7c7eefecdd279c21e015e7
5
5
  SHA512:
6
- metadata.gz: 769e109ea7106d62d8c6cf197cf878876c8ee8837eff756235e4512de6663729f1883b6355db110baa477eef78fff93fc1b500cf42be1fb401ce70a5241faa4f
7
- data.tar.gz: 15f91401f724682e3b2d5f46965c28463c2e046514db11dcf74a180d09efa833d996d2fc29fabb3fd96ac7b2ce75bfabddeb4ee5b18ad087f014e8cd6d97710e
6
+ metadata.gz: 75102f5732d45cf60672b3042c3bcb7402a5430eb5005a3ac2fbf1638d4cf6a925fd73da32f770639c7ab5f8f7509d2bc0d0e31e3498c09d6a5ddecb89e81b0b
7
+ data.tar.gz: 5b201df0d0b4e0a09db48893be051c73e0c9ab42a8ef02315c61a26ff9bf7c1cec926107fd5fb10fa0a93cb927bd4256c5f3590abf7732c9818c6187e655fb8a
@@ -1,4 +1,4 @@
1
- <%= pb_rails("button", props: { count: 153, highlight: false, icon: "🎉", classname: "count", id: "reaction-button-highlight", variant: "reaction" }) %>
1
+ <%= pb_rails("button", props: { count: 153, highlight: false, icon: "&#127881;", classname: "count", id: "reaction-button-highlight", variant: "reaction" }) %>
2
2
  <%= pb_rails("button", props: { count: 5, icon: "1️⃣", variant: "reaction", margin_left: "lg" }) %>
3
3
  <%= pb_rails("button", props: { variant: "reaction", margin_left: "lg" }) %>
4
4
  <%= pb_rails("button", props: { icon: "user", variant: "reaction", margin_left: "lg" }) %>
@@ -11,7 +11,7 @@ return (
11
11
  <Button
12
12
  count={highlightActive ? (reactionCount + 1) : reactionCount}
13
13
  highlight = {highlightActive}
14
- icon="🎉"
14
+ icon="&#127881;"
15
15
  onClick={()=> setHighlightActive(!highlightActive)}
16
16
  tabIndex={0}
17
17
  variant="reaction"
@@ -1,3 +1,3 @@
1
- The `reaction` variant accepts any emoji as a string within the `icon` prop. If nothing is passed to the icon prop, the default reaction button will be displayed as seen in the third example. The default reaction button will also be rendered if a Fontawesome icon (not an Emoji) is passed to the `icon` prop of a `reaction` variant, but the default "smiley +" icon will be replaced with the named icon.
1
+ The `reaction` variant accepts any HTML Emoji or it's hexa/decimal ref (see [here](https://www.w3schools.com/charsets/ref_emoji.asp)) as a string within the `icon` prop. If nothing is passed to the icon prop, the default reaction button will be displayed as seen in the third example. The default reaction button will also be rendered if a Fontawesome icon (not an Emoji) is passed to the `icon` prop of a `reaction` variant, but the default "smiley +" icon will be replaced with the named icon.
2
2
 
3
3
  Reaction buttons also accept two additional (optional) props: `count`, which accepts a number (i.e., a count of reactions) to be displayed next to the Emoji; and `highlight`, which is a boolean that if true, displays the 'active' state for the button. Click the first reaction button to see this in action!
@@ -1,4 +1,4 @@
1
1
  <%= pb_rails("date_picker", props: {
2
- error: "Invalid date. Please pick a valid date.",
2
+ error: raw(pb_rails("icon", props: { icon: "warning" }) + " Invalid date. Please pick a valid date."),
3
3
  picker_id: "date-picker-error"
4
4
  }) %>
@@ -1,11 +1,14 @@
1
1
  import React from 'react'
2
2
 
3
3
  import DatePicker from '../_date_picker'
4
+ import Icon from '../../pb_icon/_icon'
4
5
 
5
6
  const DatePickerError = (props) => (
6
7
  <div>
7
8
  <DatePicker
8
- error="Invalid date. Please pick a valid date."
9
+ error={<>
10
+ <Icon icon="warning" /> Invalid date. Please pick a valid date.
11
+ </>}
9
12
  pickerId="date-picker-error"
10
13
  {...props}
11
14
  />
@@ -1,5 +1,5 @@
1
1
  <%= pb_rails("date_picker", props: {
2
- picker_id: "date-picker-required-indicator",
2
+ picker_id: "date_picker_required_indicator",
3
3
  label: "Required Date Picker",
4
4
  required_indicator: true,
5
5
  }) %>
@@ -4,7 +4,7 @@ import DatePicker from "../_date_picker"
4
4
  const DatePickerRequiredIndicator = (props) => (
5
5
  <DatePicker
6
6
  label="Required Date Picker"
7
- pickerId="date-picker-required-indicator"
7
+ pickerId="date_picker_required_indicator"
8
8
  requiredIndicator
9
9
  {...props}
10
10
  />
@@ -7,6 +7,6 @@
7
7
  %>
8
8
 
9
9
  <%= pb_rails("dropdown", props: {
10
- error: "Please make a valid selection",
10
+ error: raw(pb_rails("icon", props: { icon: "warning" }) + " Please make a valid selection"),
11
11
  options: options
12
12
  }) %>
@@ -1,9 +1,12 @@
1
1
  import React, { useState } from 'react'
2
2
  import Dropdown from '../../pb_dropdown/_dropdown'
3
+ import Icon from '../../pb_icon/_icon'
3
4
 
4
5
  const DropdownError = (props) => {
5
6
  const [selectedOption, setSelectedOption] = useState()
6
- const error = selectedOption?.value ? null : "Please make a valid selection"
7
+ const error = selectedOption?.value ? null : (<>
8
+ <Icon icon="warning" /> Please make a valid selection
9
+ </>)
7
10
  const options = [
8
11
  {
9
12
  label: "United States",
@@ -1 +1 @@
1
- <%= pb_rails("file_upload", props: {id: "error", error: "Please upload a valid file."}) %>
1
+ <%= pb_rails("file_upload", props: {id: "error", error: raw(pb_rails("icon", props: { icon: "warning" }) + " Please upload a valid file")}) %>
@@ -2,6 +2,7 @@ import React, { useState } from 'react'
2
2
  import FileUpload from '../_file_upload'
3
3
  import List from '../../pb_list/_list'
4
4
  import ListItem from '../../pb_list/_list_item'
5
+ import Icon from '../../pb_icon/_icon'
5
6
 
6
7
  const AcceptedFilesList = ({ files }) => (
7
8
  <List>
@@ -18,6 +19,10 @@ const FileUploadError = (props) => {
18
19
  setFilesToUpload([...filesToUpload, ...files])
19
20
  }
20
21
 
22
+ const error = (<>
23
+ <Icon icon="warning" /> Please upload a valid file
24
+ </>)
25
+
21
26
  return (
22
27
  <div>
23
28
  <AcceptedFilesList
@@ -25,7 +30,7 @@ const FileUploadError = (props) => {
25
30
  {...props}
26
31
  />
27
32
  <FileUpload
28
- error="Please upload a valid file."
33
+ error={error}
29
34
  onFilesAccepted={handleOnFilesAccepted}
30
35
  {...props}
31
36
  />
@@ -1,60 +1,43 @@
1
- import React, { useState } from 'react'
1
+ import React from 'react'
2
2
 
3
3
  import Button from '../../pb_button/_button'
4
4
  import FormGroup from '../../pb_form_group/_form_group'
5
5
  import TextInput from '../../pb_text_input/_text_input'
6
6
 
7
- const FormGroupButton = (props) => {
8
- const [searchWithLabel, setSearchWithLabel] = useState('')
9
- const [search, setSearch] = useState('')
10
-
11
- const handleUpdateSearchWithLabel = ({ target }) => {
12
- setSearchWithLabel(target.value)
13
- }
14
-
15
- const handleUpdateSearch = ({ target }) => {
16
- setSearch(target.value)
17
- }
18
-
19
- return (
7
+ const FormGroupButton = (props) => (
8
+ <div>
9
+ <div>
10
+ <FormGroup>
11
+ <TextInput
12
+ id="search-with-label"
13
+ label="With Label"
14
+ placeholder="Search"
15
+ {...props}
16
+ />
17
+ <Button
18
+ onClick={() => alert('Button Clicked!')}
19
+ text="Submit"
20
+ variant="secondary"
21
+ {...props}
22
+ />
23
+ </FormGroup>
24
+ </div>
25
+ <br />
20
26
  <div>
21
- <div>
22
- <FormGroup>
23
- <TextInput
24
- id="search-with-label"
25
- label="With Label"
26
- onChange={handleUpdateSearchWithLabel}
27
- placeholder="Search"
28
- value={searchWithLabel}
29
- {...props}
30
- />
31
- <Button
32
- onClick={() => alert('Button Clicked!')}
33
- text="Submit"
34
- variant="secondary"
35
- {...props}
36
- />
37
- </FormGroup>
38
- </div>
39
- <br />
40
- <div>
41
- <FormGroup>
42
- <TextInput
43
- onChange={handleUpdateSearch}
44
- placeholder="Search"
45
- value={search}
46
- {...props}
47
- />
48
- <Button
49
- onClick={() => alert('Button Clicked!')}
50
- text="Submit"
51
- variant="secondary"
52
- {...props}
53
- />
54
- </FormGroup>
55
- </div>
27
+ <FormGroup>
28
+ <TextInput
29
+ placeholder="Search"
30
+ {...props}
31
+ />
32
+ <Button
33
+ onClick={() => alert('Button Clicked!')}
34
+ text="Submit"
35
+ variant="secondary"
36
+ {...props}
37
+ />
38
+ </FormGroup>
56
39
  </div>
57
- )
58
- }
40
+ </div>
41
+ )
59
42
 
60
43
  export default FormGroupButton
@@ -1,36 +1,26 @@
1
- import React, { useState } from 'react'
1
+ import React from 'react'
2
2
 
3
3
  import FormGroup from '../_form_group'
4
4
 
5
5
  import DatePicker from '../../pb_date_picker/_date_picker'
6
6
  import TextInput from '../../pb_text_input/_text_input'
7
7
 
8
- const FormGroupDatePicker = (props) => {
9
- const [eventName, setEventName] = useState('')
10
-
11
- const handleUpdateEventName = ({ target }) => {
12
- setEventName(target.value)
13
- }
14
-
15
- return (
16
- <div>
17
- <FormGroup>
18
- <TextInput
19
- id="event-name"
20
- label="Event"
21
- onChange={handleUpdateEventName}
22
- placeholder="Event Name"
23
- value={eventName}
24
- {...props}
25
- />
26
- <DatePicker
27
- label="event date"
28
- pickerId="date-picker-default"
29
- {...props}
30
- />
31
- </FormGroup>
32
- </div>
33
- )
34
- }
8
+ const FormGroupDatePicker = (props) => (
9
+ <div>
10
+ <FormGroup>
11
+ <TextInput
12
+ id="event-name"
13
+ label="Event"
14
+ placeholder="Event Name"
15
+ {...props}
16
+ />
17
+ <DatePicker
18
+ label="event date"
19
+ pickerId="date-picker-default"
20
+ {...props}
21
+ />
22
+ </FormGroup>
23
+ </div>
24
+ )
35
25
 
36
26
  export default FormGroupDatePicker
@@ -1,53 +1,31 @@
1
- import React, { useState } from 'react'
1
+ import React from 'react'
2
2
 
3
3
  import FormGroup from '../_form_group'
4
4
  import TextInput from '../../pb_text_input/_text_input'
5
5
 
6
- const FormGroupDefault = (props) => {
7
- const [formFields, setFormFields] = useState({
8
- firstName: '',
9
- middleInitial: '',
10
- lastName: '',
11
- })
12
-
13
- const handleOnChange = ({ target }) => {
14
- const { name, value } = target
15
- setFormFields({ ...formFields, [name]: value })
16
- }
17
-
18
- return (
19
- <div>
20
- <FormGroup>
21
- <TextInput
22
- id="first-name"
23
- label="First Name"
24
- name="firstName"
25
- onChange={handleOnChange}
26
- placeholder="Enter First Name"
27
- value={formFields.firstName}
28
- {...props}
29
- />
30
- <TextInput
31
- id="middle-initial"
32
- label="Middle Initial"
33
- name="middleInitial"
34
- onChange={handleOnChange}
35
- placeholder="Enter Middle Initial"
36
- value={formFields.middleInitial}
37
- {...props}
38
- />
39
- <TextInput
40
- id="last-name"
41
- label="Last Name"
42
- name="lastName"
43
- onChange={handleOnChange}
44
- placeholder="Enter Last Name"
45
- value={formFields.lastName}
46
- {...props}
47
- />
48
- </FormGroup>
49
- </div>
50
- )
51
- }
6
+ const FormGroupDefault = (props) => (
7
+ <div>
8
+ <FormGroup>
9
+ <TextInput
10
+ id="first-name"
11
+ label="First Name"
12
+ placeholder="Enter First Name"
13
+ {...props}
14
+ />
15
+ <TextInput
16
+ id="middle-initial"
17
+ label="Middle Initial"
18
+ placeholder="Enter Middle Initial"
19
+ {...props}
20
+ />
21
+ <TextInput
22
+ id="last-name"
23
+ label="Last Name"
24
+ placeholder="Enter Last Name"
25
+ {...props}
26
+ />
27
+ </FormGroup>
28
+ </div>
29
+ )
52
30
 
53
31
  export default FormGroupDefault
@@ -1,78 +1,49 @@
1
- import React, { useState } from 'react'
1
+ import React from 'react'
2
2
 
3
3
  import FormGroup from '../_form_group'
4
4
  import TextInput from '../../pb_text_input/_text_input'
5
5
  import Button from '../../pb_button/_button'
6
6
 
7
- const FormGroupFullWidth = (props) => {
8
- const [formFields, setFormFields] = useState({
9
- firstName: '',
10
- middleInitial: '',
11
- lastName: '',
12
- })
13
- const [search, setSearch] = useState('')
14
-
15
- const handleOnChange = ({ target }) => {
16
- const { name, value } = target
17
- setFormFields({ ...formFields, [name]: value })
18
- }
19
-
20
- const handleUpdateSearch = ({ target }) => {
21
- setSearch(target.value)
22
- }
23
-
24
- return (
7
+ const FormGroupFullWidth = (props) => (
8
+ <div>
9
+ <div>
10
+ <FormGroup fullWidth>
11
+ <TextInput
12
+ id="first-name-full-width"
13
+ label="First Name"
14
+ placeholder="Enter First Name"
15
+ {...props}
16
+ />
17
+ <TextInput
18
+ id="middle-initial-full-width"
19
+ label="Middle Initial"
20
+ placeholder="Enter Middle Initial"
21
+ {...props}
22
+ />
23
+ <TextInput
24
+ id="last-name-full-width"
25
+ label="Last Name"
26
+ placeholder="Enter Last Name"
27
+ {...props}
28
+ />
29
+ </FormGroup>
30
+ </div>
31
+ <br />
25
32
  <div>
26
- <div>
27
- <FormGroup fullWidth>
28
- <TextInput
29
- id="first-name-full-width"
30
- label="First Name"
31
- name="firstName"
32
- onChange={handleOnChange}
33
- placeholder="Enter First Name"
34
- value={formFields.firstName}
35
- {...props}
36
- />
37
- <TextInput
38
- id="middle-initial-full-width"
39
- label="Middle Initial"
40
- name="middleInitial"
41
- onChange={handleOnChange}
42
- placeholder="Enter Middle Initial"
43
- value={formFields.middleInitial}
44
- {...props}
45
- />
46
- <TextInput
47
- id="last-name-full-width"
48
- label="Last Name"
49
- name="lastName"
50
- onChange={handleOnChange}
51
- placeholder="Enter Last Name"
52
- value={formFields.lastName}
53
- {...props}
54
- />
55
- </FormGroup>
56
- </div>
57
- <br />
58
- <div>
59
- <FormGroup fullWidth>
60
- <TextInput
61
- onChange={handleUpdateSearch}
62
- placeholder="Search"
63
- value={search}
64
- {...props}
65
- />
66
- <Button
67
- onClick={() => alert('Button Clicked!')}
68
- text="Submit"
69
- variant="secondary"
70
- {...props}
71
- />
72
- </FormGroup>
73
- </div>
33
+ <FormGroup fullWidth>
34
+ <TextInput
35
+ placeholder="Search"
36
+ {...props}
37
+ />
38
+ <Button
39
+ onClick={() => alert('Button Clicked!')}
40
+ text="Submit"
41
+ variant="secondary"
42
+ {...props}
43
+ />
44
+ </FormGroup>
74
45
  </div>
75
- )
76
- }
46
+ </div>
47
+ )
77
48
 
78
49
  export default FormGroupFullWidth
@@ -8,14 +8,9 @@ import Flex from '../../pb_flex/_flex'
8
8
  import Passphrase from '../../pb_passphrase/_passphrase'
9
9
 
10
10
  const FormGroupSelect = (props) => {
11
- const [artistName, setArtistName] = useState('')
12
11
  const [input, setInput] = useState("");
13
12
  const handleChange = (e) => setInput(e.target.value);
14
13
 
15
- const handleUpdateArtistName = ({ target }) => {
16
- setArtistName(target.value)
17
- }
18
-
19
14
  const options = [
20
15
  { value: 'Country' },
21
16
  { value: 'Pop' },
@@ -41,9 +36,7 @@ const FormGroupSelect = (props) => {
41
36
  >
42
37
  <FormGroup>
43
38
  <TextInput
44
- onChange={handleUpdateArtistName}
45
39
  placeholder="Enter Artist Name"
46
- value={artistName}
47
40
  {...props}
48
41
  />
49
42
  <Select
@@ -1,9 +1,10 @@
1
1
  <%# SVG fill color inherited from css color property %>
2
2
  <div class="icon-wrapper">
3
- <% svg_path = Playbook::Engine.root.join("app/pb_kits/playbook/utilities/icons/clock.svg").to_s %>
4
- <p><%= pb_rails("icon", props: { icon: svg_path } ) %></p>
5
- <p><%= pb_rails("icon", props: { rotation: 90, icon: svg_path, size: "2x" } ) %></p>
6
- <p><%= pb_rails("icon", props: { spin: true, icon: svg_path, size: "3x" } ) %></p>
7
- <p><%= pb_rails("icon", props: { size: "5x", icon: svg_path } ) %></p>
8
- <p><%= pb_rails("icon", props: { flip: "horizontal", size: "5x", icon: svg_path } ) %></p>
3
+
4
+ <% svg_url = "https://upload.wikimedia.org/wikipedia/commons/3/3b/Wrench_font_awesome.svg" %>
5
+ <p><%= pb_rails("icon", props: { icon: svg_url } ) %></p>
6
+ <p><%= pb_rails("icon", props: { rotation: 90, icon: svg_url, size: "2x" } ) %></p>
7
+ <p><%= pb_rails("icon", props: { spin: true, icon: svg_url, size: "3x" } ) %></p>
8
+ <p><%= pb_rails("icon", props: { size: "5x", icon: svg_url } ) %></p>
9
+ <p><%= pb_rails("icon", props: { flip: "horizontal", size: "5x", icon: svg_url } ) %></p>
9
10
  </div>
@@ -12,4 +12,4 @@ You must source _your own SVG into component/view_ you are working on. This can
12
12
 
13
13
  ### Rails
14
14
 
15
- Pass a local filesystem path to an SVG under your application or a mounted engine (for example `Playbook::Engine.root.join("app/pb_kits/playbook/utilities/icons/clock.svg").to_s`) via the `icon` or `custom_icon` prop. Remote `http(s)` URLs are not fetched only local / engine paths are supported.
15
+ Sending the absolute path to the `icon` prop results in an `<SVG>` tag within the working view.
@@ -2,7 +2,7 @@
2
2
  <%= object.render_svg %>
3
3
  <% elsif object.valid_emoji? %>
4
4
  <span class="pb_icon_kit_emoji">
5
- <%= object.icon %>
5
+ <%= object.icon.html_safe %>
6
6
  </span>
7
7
  <% else %>
8
8
  <%= pb_content_tag(:i) do %>