playbook_ui 14.5.0.pre.alpha.20241007playbookwebsiteaddrdbms4036 → 14.5.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +4 -23
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
  5. data/app/pb_kits/playbook/pb_button/_button.tsx +2 -6
  6. data/app/pb_kits/playbook/pb_contact/_contact.tsx +5 -17
  7. data/app/pb_kits/playbook/pb_contact/contact.html.erb +6 -14
  8. data/app/pb_kits/playbook/pb_contact/contact.rb +0 -4
  9. data/app/pb_kits/playbook/pb_contact/contact.test.js +1 -1
  10. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +6 -2
  11. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +7 -2
  12. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -4
  13. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -1
  14. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -4
  15. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +3 -6
  16. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +1 -1
  17. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_header_styles.scss +2 -6
  18. data/app/pb_kits/playbook/pb_dialog/_dialog.scss +0 -2
  19. data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
  20. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +2 -10
  21. data/app/pb_kits/playbook/pb_filter/docs/_filter_max_height.html.erb +1 -5
  22. data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.html.erb +1 -5
  23. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +1 -5
  24. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.html.erb +1 -5
  25. data/app/pb_kits/playbook/pb_filter/docs/_filter_only.html.erb +1 -5
  26. data/app/pb_kits/playbook/pb_filter/docs/_filter_placement.html.erb +1 -5
  27. data/app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb +1 -5
  28. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -9
  29. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
  30. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
  31. data/app/pb_kits/playbook/pb_map/_map_controls.tsx +1 -7
  32. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +232 -210
  33. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +1 -1
  34. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -3
  35. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +0 -2
  36. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +1 -12
  37. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md +1 -3
  38. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +2 -10
  39. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.html.erb +13 -14
  40. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +4 -4
  41. data/app/pb_kits/playbook/pb_radio/_radio.tsx +33 -92
  42. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.html.erb +0 -2
  43. data/app/pb_kits/playbook/pb_radio/docs/example.yml +0 -1
  44. data/app/pb_kits/playbook/pb_radio/docs/index.js +0 -1
  45. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +5 -12
  46. data/app/pb_kits/playbook/pb_select/_select.tsx +2 -5
  47. data/app/pb_kits/playbook/pb_select/select.html.erb +1 -1
  48. data/app/pb_kits/playbook/pb_select/select.rb +0 -4
  49. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -0
  50. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +13 -17
  51. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +1 -0
  52. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -14
  53. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -7
  54. data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +5 -6
  55. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -3
  56. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
  57. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
  58. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -2
  59. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +2 -9
  60. data/app/pb_kits/playbook/utilities/icons/allicons.tsx +13 -136
  61. data/dist/chunks/_typeahead-B2zRxReA.js +22 -0
  62. data/dist/chunks/_weekday_stacked-Co95UEiW.js +45 -0
  63. data/dist/chunks/lib-D2U4I1U6.js +16 -0
  64. data/dist/chunks/{pb_form_validation-D9zkwt2b.js → pb_form_validation-zV9OpdSt.js} +1 -1
  65. data/dist/chunks/vendor.js +1 -1
  66. data/dist/menu.yml +1 -3
  67. data/dist/playbook-doc.js +1 -1
  68. data/dist/playbook-rails-react-bindings.js +1 -1
  69. data/dist/playbook-rails.js +1 -1
  70. data/dist/playbook.css +1 -1
  71. data/lib/playbook/pagination_renderer.rb +2 -10
  72. data/lib/playbook/pb_doc_helper.rb +5 -5
  73. data/lib/playbook/version.rb +2 -2
  74. metadata +6 -35
  75. data/app/pb_kits/playbook/pb_drawer/_close_icon.tsx +0 -25
  76. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +0 -465
  77. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +0 -195
  78. data/app/pb_kits/playbook/pb_drawer/_drawer_context.tsx +0 -3
  79. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +0 -117
  80. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -43
  81. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb +0 -1
  82. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +0 -63
  83. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +0 -55
  84. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +0 -113
  85. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +0 -12
  86. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -5
  87. data/app/pb_kits/playbook/pb_drawer/drawer.html.erb +0 -12
  88. data/app/pb_kits/playbook/pb_drawer/drawer.rb +0 -8
  89. data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +0 -77
  90. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +0 -19
  91. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +0 -27
  92. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
  93. data/app/pb_kits/playbook/pb_multi_level_select/context/index.tsx +0 -5
  94. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx +0 -105
  95. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.md +0 -1
  96. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx +0 -106
  97. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.md +0 -1
  98. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select_options.tsx +0 -149
  99. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +0 -62
  100. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.html.erb +0 -88
  101. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx +0 -60
  102. data/app/pb_kits/playbook/utilities/icons/angle-down.svg +0 -3
  103. data/app/pb_kits/playbook/utilities/icons/envelope.svg +0 -3
  104. data/dist/chunks/_typeahead-CT2ByCBK.js +0 -22
  105. data/dist/chunks/_weekday_stacked-Bwdy1TtH.js +0 -45
  106. data/dist/chunks/lib-CEpcaI8y.js +0 -29
@@ -87,4 +87,4 @@ const MultiLevelSelectDefault = (props) => {
87
87
  )
88
88
  };
89
89
 
90
- export default MultiLevelSelectDefault;
90
+ export default MultiLevelSelectDefault;
@@ -15,6 +15,3 @@ examples:
15
15
  - multi_level_select_return_all_selected: Return All Selected
16
16
  - multi_level_select_selected_ids_react: Selected Ids
17
17
  - multi_level_select_color: With Pills (Custom Color)
18
- - multi_level_select_with_children: Checkboxes With Children
19
- - multi_level_select_with_children_with_radios: Single Select With Children
20
-
@@ -4,5 +4,3 @@ export { default as MultiLevelSelectSingleChildrenOnly } from './_multi_level_se
4
4
  export { default as MultiLevelSelectReturnAllSelected } from './_multi_level_select_return_all_selected.jsx'
5
5
  export { default as MultiLevelSelectSelectedIdsReact } from "./_multi_level_select_selected_ids_react.jsx"
6
6
  export { default as MultiLevelSelectColor } from './_multi_level_select_color.jsx'
7
- export { default as MultiLevelSelectWithChildren } from './_multi_level_select_with_children.jsx'
8
- export { default as MultiLevelSelectWithChildrenWithRadios } from './_multi_level_select_with_children_with_radios.jsx'
@@ -22,16 +22,6 @@ const PaginationPageChange = (props) => {
22
22
 
23
23
  return (
24
24
  <div className="App">
25
- <Pagination
26
- current={activePage}
27
- key={`pagination-top-${activePage}`}
28
- marginBottom="xs"
29
- onChange={onPageChange}
30
- range={5}
31
- total={totalPages}
32
- {...props}
33
- />
34
-
35
25
  <Table
36
26
  marginBottom="xs"
37
27
  responsive="none"
@@ -59,8 +49,7 @@ const PaginationPageChange = (props) => {
59
49
  </Table>
60
50
 
61
51
  <Pagination
62
- current={activePage}
63
- key={`pagination-bottom-${activePage}`}
52
+ current={1}
64
53
  onChange={onPageChange}
65
54
  range={5}
66
55
  total={totalPages}
@@ -1,3 +1 @@
1
- You can use the `onChange` prop to control the data of your table. This prop is callback function that will allow you control the state.
2
-
3
- To ensure synchronization between multiple pagination components on a single page, use unique, dynamic keys for each pagination instance. Each Pagination component should have its own dynamic key that reflects the current active page: this example uses `pagination-top-${activePage}` and `pagination-bottom-${activePage}`.
1
+ You can use the `onChange` prop to control the data of your table. This prop is callback function that will allow you control the state.
@@ -12,7 +12,6 @@ import Icon from '../pb_icon/_icon'
12
12
  import PbReactPopover from '../pb_popover/_popover'
13
13
  import TextInput from '../pb_text_input/_text_input'
14
14
  import { GenericObject } from "../types"
15
- import { getAllIcons } from "../utilities/icons/allicons"
16
15
 
17
16
  type PassphraseProps = {
18
17
  aria?: { [key: string]: string },
@@ -97,9 +96,6 @@ const Passphrase = (props: PassphraseProps): React.ReactElement => {
97
96
  />
98
97
  )
99
98
 
100
- const shieldIcon = getAllIcons()["shieldCheck"]
101
- const eyeIcon = getAllIcons()["eye"]
102
-
103
99
  return (
104
100
  <div
105
101
  {...ariaProps}
@@ -139,8 +135,7 @@ const Passphrase = (props: PassphraseProps): React.ReactElement => {
139
135
  size="xs"
140
136
  >
141
137
  <Icon
142
- className="svg-inline--fa"
143
- customIcon={shieldIcon.icon as unknown as { [key: string]: SVGElement }}
138
+ icon="shield-check"
144
139
  marginRight="xs"
145
140
  />
146
141
  {tip}
@@ -178,10 +173,7 @@ const Passphrase = (props: PassphraseProps): React.ReactElement => {
178
173
  color="light"
179
174
  dark={dark}
180
175
  >
181
- <Icon
182
- className="svg-inline--fa"
183
- customIcon={eyeIcon.icon as unknown as { [key: string]: SVGElement }}
184
- />
176
+ <Icon icon="eye" />
185
177
  </Body>
186
178
  </span>
187
179
  </div>
@@ -1,10 +1,8 @@
1
1
  <%= pb_rails("button", props: { variant: "secondary", id: 'list' }) do %>
2
2
  <%= pb_rails("flex", props: {align: "center"}) do %>
3
- Filter By
3
+ Filter By
4
4
  <%= pb_rails("flex/flex_item", props: {margin_left: "xxs"}) do %>
5
- <div id="arrow-icon" style="display: flex">
6
- <%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true }) %>
7
- </div>
5
+ <div id="arrow-icon" style="display: flex"></div>
8
6
  <% end %>
9
7
  <% end %>
10
8
  <% end %>
@@ -20,17 +18,18 @@
20
18
 
21
19
 
22
20
  <script type="text/javascript">
23
- const popoverButton = document.querySelector("#list")
24
- let buttonClicked = false
21
+ const button = document.querySelector("#list")
22
+ let buttonClicked = false
25
23
 
26
- const arrowDiv = document.querySelector("#arrow-icon")
24
+ const arrowDiv = document.querySelector("#arrow-icon")
25
+ arrowDiv.innerHTML = '<i class="far fa-angle-down"></i>'
27
26
 
28
- popoverButton.onclick = () => {
29
- buttonClicked = !buttonClicked
30
- if (buttonClicked) {
31
- arrowDiv.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="auto" height="auto" viewBox="0 0 31 25" fill="none" class="pb_custom_icon svg-inline--fa pb_icon_kit svg_fw" id="" data="{}" aria="{}" tabindex=""><path d="M14.2031 5.70312C14.625 5.28125 15.3281 5.28125 15.75 5.70312L24.7969 14.7031C25.2188 15.1719 25.2188 15.875 24.7969 16.2969C24.3281 16.7656 23.625 16.7656 23.2031 16.2969L15 8.09375L6.79688 16.2969C6.32812 16.7656 5.625 16.7656 5.20312 16.2969C4.73438 15.875 4.73438 15.1719 5.20312 14.75L14.2031 5.70312Z" fill="currentColor"/></svg>'
32
- } else {
33
- arrowDiv.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="auto" height="auto" viewBox="0 0 31 25" fill="none" class="pb_custom_icon svg-inline--fa pb_icon_kit svg_fw" id="" data="{}" aria="{}" tabindex=""><path d="M14.2031 19.2969L5.20312 10.2969C4.73438 9.875 4.73438 9.17188 5.20312 8.70312C5.625 8.28125 6.32812 8.28125 6.79688 8.70312L15 16.9531L23.2031 8.75C23.625 8.28125 24.3281 8.28125 24.7969 8.75C25.2188 9.17188 25.2188 9.875 24.7969 10.2969L15.75 19.2969C15.3281 19.7656 14.625 19.7656 14.2031 19.2969Z" fill="currentColor"/></svg>'
34
- }
27
+ button.onclick = () => {
28
+ buttonClicked = !buttonClicked
29
+ if (buttonClicked) {
30
+ arrowDiv.innerHTML = '<i class="far fa-angle-up"></i>'
31
+ } else {
32
+ arrowDiv.innerHTML = '<i class="far fa-angle-down"></i>'
35
33
  }
34
+ }
36
35
  </script>
@@ -26,10 +26,10 @@ const PopoverWithButton = (props) => {
26
26
  className={showPopover ? "fa-flip-vertical" : ""}
27
27
  display="inline_flex"
28
28
  >
29
- <Icon
30
- fixedWidth
31
- icon="angle-down"
32
- margin-left="xxs"
29
+ <Icon
30
+ fixedWidth
31
+ icon="angle-down"
32
+ margin-left="xxs"
33
33
  />
34
34
  </Flex>
35
35
  </Flex>
@@ -1,30 +1,28 @@
1
- /*eslint-disable react/no-multi-comp */
1
+ /*eslint-disable react/no-multi-comp, flowtype/space-before-type-colon */
2
2
 
3
- import React, { forwardRef, useRef } from 'react'
3
+ import React, { forwardRef } from 'react'
4
4
  import Body from '../pb_body/_body'
5
- import Flex from '../pb_flex/_flex'
6
5
  import classnames from 'classnames'
7
6
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
8
7
  import { globalProps, GlobalProps } from '../utilities/globalProps'
9
8
 
10
9
  type RadioProps = {
11
- aria?: { [key: string]: string },
10
+ aria?: {[key: string]: string},
12
11
  alignment?: string,
13
12
  checked?: boolean,
14
13
  children?: React.ReactChild[] | React.ReactChild,
15
- customChildren?: boolean,
16
14
  className?: string,
17
15
  dark?: boolean,
18
- data?: { [key: string]: string },
16
+ data?: {[key: string]: string},
19
17
  disabled?: boolean,
20
18
  error?: boolean,
21
- htmlOptions?: { [key: string]: string | number | boolean | (() => void) },
19
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
22
20
  id?: string,
23
21
  label: string,
24
22
  name?: string,
25
23
  value?: string,
26
24
  text?: string,
27
- onChange: (event: React.FormEvent<HTMLInputElement> | null) => void,
25
+ onChange: (event: React.FormEvent<HTMLInputElement> | null)=>void,
28
26
  } & GlobalProps
29
27
 
30
28
  const Radio = ({
@@ -32,11 +30,10 @@ const Radio = ({
32
30
  alignment,
33
31
  children,
34
32
  className,
35
- customChildren = false,
36
33
  dark = false,
34
+ data = {},
37
35
  disabled = false,
38
36
  error = false,
39
- data = {},
40
37
  htmlOptions = {},
41
38
  id,
42
39
  label,
@@ -46,28 +43,17 @@ const Radio = ({
46
43
  onChange = () => { void 0 },
47
44
  ...props
48
45
  }: RadioProps, ref: any) => {
49
- const radioRef = useRef(null);
50
-
51
- const ariaProps = buildAriaProps(aria);
52
- const dataProps = buildDataProps(data);
53
- const htmlProps = buildHtmlProps(htmlOptions);
46
+ const ariaProps = buildAriaProps(aria)
47
+ const dataProps = buildDataProps(data)
48
+ const htmlProps = buildHtmlProps(htmlOptions)
54
49
  const classes = classnames(
55
- buildCss('pb_radio_kit', alignment),
56
- dark ? 'dark' : null,
57
- error ? 'error' : null,
50
+ buildCss('pb_radio_kit', alignment ),
51
+ dark ? 'dark': null, error ? 'error': null,
58
52
  globalProps(props),
59
- className
60
- );
61
-
62
- const classesCustom = classnames(
63
- dark ? 'dark' : null,
64
- error ? 'error' : null,
65
- globalProps(props),
66
- className
67
- );
53
+ className)
68
54
 
69
55
  const displayRadio = (props: RadioProps & any) => {
70
- if (children && customChildren == false)
56
+ if (children)
71
57
  return (children)
72
58
  else
73
59
  return (
@@ -84,69 +70,24 @@ const Radio = ({
84
70
  />
85
71
  )}
86
72
 
87
- const handleContainerClick = (event: React.MouseEvent<HTMLDivElement, MouseEvent> | undefined) => {
88
- if (event) {
89
- const target = event.target as HTMLElement;
90
- if (
91
- target.id === 'pb-radio-children-wrapper' ||
92
- target.closest('#pb-radio-children-wrapper')
93
- ) {
94
- radioRef.current?.click();
95
- }
96
- }
97
- };
98
-
99
73
  return (
100
- customChildren ? (
101
- <Flex
102
- {...ariaProps}
103
- {...dataProps}
104
- {...htmlProps}
105
- align='center'
106
- className={classesCustom}
107
- cursor='pointer'
108
- htmlFor={id}
109
- htmlOptions={{
110
- onClick: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
111
- handleContainerClick(event);
112
- }) as unknown as () => void
113
- }}
114
- id="radio-container"
115
- >
116
- <label className={buildCss('pb_radio_kit', alignment)}>
117
- <input
118
- disabled={disabled}
119
- id={id}
120
- name={name}
121
- onChange={onChange}
122
- ref={radioRef}
123
- type="radio"
124
- value={value}
125
- {...props}
126
- />
127
- <span className="pb_radio_button" />
128
- </label>
129
- <div id="pb-radio-children-wrapper"> {children} </div>
130
- </Flex>
131
- ) : (
132
- <label
133
- {...ariaProps}
134
- {...dataProps}
135
- {...htmlProps}
136
- className={classes}
137
- htmlFor={id}
138
- >
139
- <>{displayRadio(props)}</>
140
- <span className="pb_radio_button" />
141
- <Body
142
- dark={dark}
143
- status={error ? 'negative' : null}
144
- text={label}
145
- variant={null}
146
- />
147
- </label>
148
- )
149
- );
150
- };
74
+ <label
75
+ {...ariaProps}
76
+ {...dataProps}
77
+ {...htmlProps}
78
+ className={classes}
79
+ htmlFor={id}
80
+ >
81
+ <>{displayRadio(props)}</>
82
+ <span className="pb_radio_button" />
83
+ <Body
84
+ dark={dark}
85
+ status={error ? 'negative' : null}
86
+ text={label}
87
+ variant={null}
88
+ />
89
+ </label>
90
+ )
91
+ }
151
92
 
152
- export default forwardRef(Radio);
93
+ export default forwardRef(Radio)
@@ -10,7 +10,6 @@
10
10
  <%= pb_rails("radio", props: {
11
11
  custom_children: true,
12
12
  label: "Select",
13
- margin_bottom: "sm",
14
13
  name: "Group1",
15
14
  value: "Select",
16
15
  }) do %>
@@ -23,7 +22,6 @@
23
22
  <%= pb_rails("radio", props: {
24
23
  custom_children: true,
25
24
  label: "Typeahead",
26
- margin_bottom: "sm",
27
25
  name: "Group1",
28
26
  value: "Typeahead",
29
27
  }) do %>
@@ -15,7 +15,6 @@ examples:
15
15
  - radio_error: With Error
16
16
  - radio_alignment: Alignment
17
17
  - radio_disabled: Disabled
18
- - radio_custom_children: Custom Children
19
18
 
20
19
  swift:
21
20
  - radio_default_swift: Default
@@ -3,4 +3,3 @@ export { default as RadioCustom } from './_radio_custom.jsx'
3
3
  export { default as RadioError } from './_radio_error.jsx'
4
4
  export { default as RadioAlignment } from './_radio_alignment.jsx'
5
5
  export { default as RadioDisabled } from './_radio_disabled.jsx'
6
- export { default as RadioCustomChildren } from './_radio_custom_children.jsx'
@@ -1,7 +1,5 @@
1
1
  import React, { useState } from 'react'
2
2
 
3
- import { getAllIcons } from "../../utilities/icons/allicons"
4
-
5
3
  import Flex from '../../pb_flex/_flex'
6
4
  import PbReactPopover from '../../pb_popover/_popover'
7
5
  import Button from '../../pb_button/_button'
@@ -67,7 +65,6 @@ const toolbarDropdownItems = [
67
65
  },
68
66
  ]
69
67
 
70
- const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
71
68
 
72
69
  const handleTogglePopover = () => {
73
70
  setShowPopover(!showPopover)
@@ -95,10 +92,8 @@ for (const { text, isActive, icon } of toolbarDropdownItems) {
95
92
  <Flex className={showPopover ? "fa-flip-vertical" : ""}
96
93
  display="inline_flex"
97
94
  >
98
- <Icon
99
- className="svg-inline--fa"
100
- customIcon={angleDown}
101
- fixedWidth
95
+ <Icon fixedWidth
96
+ icon="angle-down"
102
97
  margin-left="xs"
103
98
  />
104
99
  </Flex>
@@ -130,10 +125,8 @@ const popoverReference = (
130
125
  <Flex className={showPopover ? "fa-flip-vertical" : ""}
131
126
  display="inline_flex"
132
127
  >
133
- <Icon
134
- className="svg-inline--fa"
135
- customIcon={angleDown}
136
- fixedWidth
128
+ <Icon fixedWidth
129
+ icon="angle-down"
137
130
  margin-left="xs"
138
131
  />
139
132
  </Flex>
@@ -176,4 +169,4 @@ const popoverReference = (
176
169
  )
177
170
  }
178
171
 
179
- export default ToolbarDropdown
172
+ export default ToolbarDropdown
@@ -4,7 +4,6 @@ import classnames from 'classnames'
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { globalProps, GlobalProps, domSafeProps } from '../utilities/globalProps'
6
6
  import type { InputCallback } from '../types'
7
- import { getAllIcons } from "../utilities/icons/allicons"
8
7
 
9
8
  import Body from '../pb_body/_body'
10
9
  import Caption from '../pb_caption/_caption'
@@ -91,8 +90,6 @@ const Select = ({
91
90
  compactClass
92
91
  );
93
92
 
94
- const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
95
-
96
93
  const selectWrapperClass = classnames(buildCss('pb_select_kit_wrapper'), { error }, className)
97
94
  const selectBody =(() =>{
98
95
  if (children) return children
@@ -137,9 +134,9 @@ const Select = ({
137
134
  {selectBody}
138
135
  { multiple !== true ?
139
136
  <Icon
140
- className="pb_select_kit_caret svg-inline--fa"
141
- customIcon={angleDown}
137
+ className="pb_select_kit_caret"
142
138
  fixedWidth
139
+ icon="angle-down"
143
140
  />
144
141
  :
145
142
  null
@@ -26,7 +26,7 @@
26
26
  <%= pb_rails("body", props: { status: "negative", text: object.error }) %>
27
27
  <% end %>
28
28
  <% if object.multiple != true %>
29
- <%= pb_rails("icon", props: { custom_icon: Playbook::Engine::root.join(angle_down_path), fixed_width: true, classname: "pb_select_kit_caret"}) %>
29
+ <%= pb_rails("icon", props: { icon: "angle-down", fixed_width: true, classname: "pb_select_kit_caret"}) %>
30
30
  <% end %>
31
31
  </label>
32
32
  <% end %>
@@ -84,10 +84,6 @@ module Playbook
84
84
  end
85
85
  end
86
86
 
87
- def angle_down_path
88
- "app/pb_kits/playbook/utilities/icons/angle-down.svg"
89
- end
90
-
91
87
  private
92
88
 
93
89
  def error_class
@@ -45,6 +45,7 @@
45
45
  }
46
46
  }
47
47
  .text_input_wrapper {
48
+ margin-bottom: 1rem;
48
49
  input::placeholder,
49
50
  .text_input .placeholder {
50
51
  @include pb_body_light_dark;
@@ -1,14 +1,14 @@
1
1
  import React, { useRef, useState, forwardRef, ForwardedRef } from "react"
2
2
 
3
3
  import {
4
- arrow,
5
- flip,
6
- offset,
7
- Placement,
8
- safePolygon,
4
+ arrow,
5
+ flip,
6
+ offset,
7
+ Placement,
8
+ safePolygon,
9
9
  shift,
10
- useFloating,
11
- useHover,
10
+ useFloating,
11
+ useHover,
12
12
  useInteractions,
13
13
  } from "@floating-ui/react"
14
14
 
@@ -16,8 +16,6 @@ import classnames from "classnames"
16
16
  import { GlobalProps, globalProps } from "../utilities/globalProps"
17
17
  import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props"
18
18
  import Flex from "../pb_flex/_flex"
19
- import { getAllIcons } from "../utilities/icons/allicons"
20
- import Icon from '../pb_icon/_icon'
21
19
 
22
20
  type TooltipProps = {
23
21
  aria?: { [key: string]: string },
@@ -55,7 +53,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
55
53
  const dataProps: { [key: string]: string } = buildDataProps(data)
56
54
  const ariaProps: { [key: string]: string } = buildAriaProps(aria)
57
55
  const htmlProps = buildHtmlProps(htmlOptions)
58
-
56
+
59
57
  const css = classnames(
60
58
  globalProps({...rest}),
61
59
  className,
@@ -63,6 +61,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
63
61
  const [open, setOpen] = useState(false)
64
62
  const arrowRef = useRef(null)
65
63
 
64
+
66
65
  const {
67
66
  context,
68
67
  middlewareData: { arrow: { x: arrowX, y: arrowY } = {}, },
@@ -96,7 +95,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
96
95
  placement: preferredPlacement
97
96
  })
98
97
 
99
-
98
+
100
99
  const { getFloatingProps } = useInteractions([
101
100
  useHover(context, {
102
101
  delay,
@@ -149,16 +148,13 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
149
148
  },
150
149
  })}
151
150
  >
152
- <Flex
151
+ <Flex
153
152
  align="center"
154
153
  gap="xs"
155
154
  >
156
155
  {icon && (
157
- <i className={`pb_icon_kit`}>
158
- <Icon
159
- icon={icon}
160
- />
161
- </i>)}
156
+ <i className={`pb_icon_kit far fa-${icon} fa-fw`} />
157
+ )}
162
158
  {text}
163
159
  </Flex>
164
160
  <div
@@ -68,6 +68,7 @@
68
68
  opacity: 0;
69
69
  }
70
70
  [class^=pb_list_kit] {
71
+ margin-top: -$space-sm;
71
72
  li {
72
73
  transition: background-color .25s ease-in-out;
73
74
  }
@@ -109,20 +109,6 @@ test('should pass className prop', () => {
109
109
  expect(kit).toHaveClass(className)
110
110
  })
111
111
 
112
- test('typeahead textinput has mb_sm class by default', () => {
113
- render(
114
- <Typeahead
115
- data={{ testid: 'default-mb-test' }}
116
- options={options}
117
- />
118
- )
119
-
120
- const kit = screen.getByTestId('default-mb-test')
121
- expect(kit).toHaveClass("pb_typeahead_kit mb_sm")
122
- const textInput = kit.querySelector(".pb_text_input_kit")
123
- expect(textInput).toHaveClass("mb_none")
124
- })
125
-
126
112
  test('typeahead with colored pills', () => {
127
113
  render(
128
114
  <Typeahead
@@ -45,7 +45,6 @@ type TypeaheadProps = {
45
45
  getOptionLabel?: string | (() => any),
46
46
  getOptionValue?: string | (() => any),
47
47
  name?: string,
48
- marginBottom?: "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl",
49
48
  pillColor?: "primary" | "neutral" | "success" | "warning" | "error" | "info" | "data_1" | "data_2" | "data_3" | "data_4" | "data_5" | "data_6" | "data_7" | "data_8" | "windows" | "siding" | "roofing" | "doors" | "gutters" | "solar" | "insulation" | "accessories",
50
49
  } & GlobalProps
51
50
 
@@ -79,7 +78,6 @@ const Typeahead = ({
79
78
  htmlOptions = {},
80
79
  id,
81
80
  loadOptions = noop,
82
- marginBottom = "sm",
83
81
  pillColor,
84
82
  ...props
85
83
  }: TypeaheadProps) => {
@@ -136,15 +134,11 @@ const Typeahead = ({
136
134
  }
137
135
  }
138
136
 
139
- const filteredProps: TypeaheadProps = {...props}
140
- delete filteredProps.truncate
141
-
142
137
  const dataProps = buildDataProps(data)
143
138
  const htmlProps = buildHtmlProps(htmlOptions)
144
139
  const classes = classnames(
145
140
  'pb_typeahead_kit react-select',
146
- `mb_${marginBottom}`,
147
- globalProps(filteredProps),
141
+ globalProps(props),
148
142
  className
149
143
  )
150
144
 
@@ -11,15 +11,14 @@ type Props = {
11
11
  const TypeaheadControl = (props: Props) => (
12
12
  <div className="pb_typeahead_wrapper">
13
13
  <TextInput
14
- dark={props.selectProps.dark}
15
- error={props.selectProps.error}
16
- label={props.selectProps.label}
17
- marginBottom="none"
14
+ dark={props.selectProps.dark}
15
+ error={props.selectProps.error}
16
+ label={props.selectProps.label}
18
17
  >
19
18
  <Flex>
20
19
  <components.Control
21
- className="text_input"
22
- {...props}
20
+ className="text_input"
21
+ {...props}
23
22
  />
24
23
  </Flex>
25
24
  </TextInput>
@@ -16,7 +16,7 @@ type Props = {
16
16
  const MultiValue = (props: Props) => {
17
17
  const { removeProps } = props
18
18
  const { imageUrl, label } = props.data
19
- const { dark, multiKit, pillColor, truncate } = props.selectProps
19
+ const { dark, multiKit, pillColor } = props.selectProps
20
20
 
21
21
  const formPillProps = {
22
22
  marginRight: 'xs',
@@ -51,7 +51,6 @@ const MultiValue = (props: Props) => {
51
51
  name={label}
52
52
  size={multiKit === 'smallPill' ? 'small' : ''}
53
53
  text=''
54
- truncate={truncate}
55
54
  {...props}
56
55
  />
57
56
  }
@@ -65,7 +64,6 @@ const MultiValue = (props: Props) => {
65
64
  name=''
66
65
  size={multiKit === 'smallPill' ? 'small' : ''}
67
66
  text={label}
68
- truncate={truncate}
69
67
  {...props}
70
68
  />
71
69
  }