playbook_ui 14.6.0.pre.alpha.play1586datearea4218 → 14.6.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +7 -25
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/index.js +0 -60
  6. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +9 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +9 -1
  8. data/app/pb_kits/playbook/pb_card/_card.tsx +1 -5
  9. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +1 -5
  10. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +7 -30
  11. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md +2 -0
  12. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +3 -84
  13. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +5 -28
  14. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -5
  15. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +0 -3
  16. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +1 -10
  17. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
  18. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +2 -2
  19. data/app/pb_kits/playbook/pb_filter/Filter/FilterDouble.tsx +0 -2
  20. data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.tsx +0 -2
  21. data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.tsx +1 -4
  22. data/app/pb_kits/playbook/pb_filter/Filter/ResultsCount.tsx +2 -4
  23. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +1 -1
  24. data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -3
  25. data/app/pb_kits/playbook/pb_filter/docs/index.js +0 -1
  26. data/app/pb_kits/playbook/pb_filter/filter.html.erb +2 -2
  27. data/app/pb_kits/playbook/pb_filter/filter.rb +0 -2
  28. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -3
  29. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +2 -8
  30. data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +6 -3
  31. data/app/pb_kits/playbook/pb_flex/flex_item.rb +2 -7
  32. data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
  33. data/app/pb_kits/playbook/pb_form/form.rb +0 -2
  34. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -9
  35. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
  36. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
  37. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +227 -211
  38. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +1 -1
  39. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -4
  40. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +0 -2
  41. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +65 -169
  42. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.test.js +5 -5
  43. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +9 -15
  44. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +0 -2
  45. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +0 -1
  46. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +6 -28
  47. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb +1 -31
  48. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +18 -86
  49. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +6 -15
  50. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md +1 -1
  51. data/app/pb_kits/playbook/pb_phone_number_input/intlTelInput.scss +931 -849
  52. data/app/pb_kits/playbook/pb_phone_number_input/types.d.ts +1 -4
  53. data/app/pb_kits/playbook/pb_popover/_popover.tsx +2 -6
  54. data/app/pb_kits/playbook/pb_popover/docs/_popover_default.html.erb +1 -1
  55. data/app/pb_kits/playbook/pb_popover/popover.rb +1 -3
  56. data/app/pb_kits/playbook/pb_timeline/_item.tsx +23 -59
  57. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +0 -8
  58. data/app/pb_kits/playbook/pb_timeline/docs/example.yml +1 -2
  59. data/app/pb_kits/playbook/pb_timeline/docs/index.js +0 -1
  60. data/app/pb_kits/playbook/pb_timeline/item.html.erb +21 -17
  61. data/app/pb_kits/playbook/pb_timeline/item.rb +0 -4
  62. data/app/pb_kits/playbook/pb_timeline/timeline.test.js +0 -84
  63. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -4
  64. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -3
  65. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -3
  66. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -3
  67. data/app/pb_kits/playbook/utilities/globalProps.ts +2 -39
  68. data/dist/chunks/_typeahead-BYw0HEgO.js +22 -0
  69. data/dist/chunks/_weekday_stacked-DumiyWjh.js +45 -0
  70. data/dist/chunks/{lib-D-mTv-kp.js → lib-CEpcaI8y.js} +1 -1
  71. data/dist/chunks/{pb_form_validation-BkWGwJsl.js → pb_form_validation-D9zkwt2b.js} +1 -1
  72. data/dist/chunks/vendor.js +1 -1
  73. data/dist/playbook-doc.js +1 -1
  74. data/dist/playbook-rails-react-bindings.js +1 -1
  75. data/dist/playbook-rails.js +1 -1
  76. data/dist/playbook.css +1 -1
  77. data/lib/playbook/kit_base.rb +1 -21
  78. data/lib/playbook/pb_doc_helper.rb +5 -5
  79. data/lib/playbook/pb_forms_helper.rb +1 -3
  80. data/lib/playbook/version.rb +2 -2
  81. metadata +6 -48
  82. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx +0 -72
  83. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md +0 -5
  84. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +0 -45
  85. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md +0 -1
  86. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb +0 -9
  87. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx +0 -33
  88. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb +0 -10
  89. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx +0 -34
  90. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +0 -1
  91. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.html.erb +0 -41
  92. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.jsx +0 -71
  93. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_rails.md +0 -1
  94. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_react.md +0 -1
  95. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +0 -39
  96. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md +0 -1
  97. data/app/pb_kits/playbook/pb_form/formHelper.js +0 -27
  98. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +0 -19
  99. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +0 -27
  100. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
  101. data/app/pb_kits/playbook/pb_multi_level_select/context/index.tsx +0 -5
  102. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb +0 -93
  103. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.md +0 -1
  104. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx +0 -105
  105. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.md +0 -1
  106. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx +0 -106
  107. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.md +0 -1
  108. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select_options.tsx +0 -149
  109. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.html.erb +0 -336
  110. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.jsx +0 -97
  111. data/app/pb_kits/playbook/pb_timeline/date_area.html.erb +0 -12
  112. data/app/pb_kits/playbook/pb_timeline/date_area.rb +0 -13
  113. data/app/pb_kits/playbook/pb_timeline/detail_area.html.erb +0 -3
  114. data/app/pb_kits/playbook/pb_timeline/detail_area.rb +0 -11
  115. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -43
  116. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -68
  117. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +0 -4
  118. data/app/pb_kits/playbook/pb_timeline/node_area.html.erb +0 -14
  119. data/app/pb_kits/playbook/pb_timeline/node_area.rb +0 -16
  120. data/app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx +0 -29
  121. data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +0 -38
  122. data/app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx +0 -42
  123. data/app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx +0 -3
  124. data/dist/chunks/_typeahead-BhHnXJjy.js +0 -22
  125. data/dist/chunks/_weekday_stacked-C-VEa5Ar.js +0 -45
@@ -1,4 +1 @@
1
- declare module 'intl-tel-input/build/js/intlTelInputWithUtils.js' {
2
- const intlTelInput: any;
3
- export default intlTelInput;
4
- }
1
+ declare module 'intl-tel-input'
@@ -21,7 +21,7 @@ import classnames from "classnames";
21
21
  import { globalProps, GlobalProps } from "../utilities/globalProps";
22
22
  import { uniqueId } from 'lodash';
23
23
 
24
- type ModifiedGlobalProps = Omit<GlobalProps, 'minWidth' | 'maxHeight' | 'minHeight'>
24
+ type ModifiedGlobalProps = Omit<GlobalProps, 'minWidth'>
25
25
 
26
26
  type PbPopoverProps = {
27
27
  aria?: { [key: string]: string };
@@ -79,7 +79,6 @@ const Popover = (props: PbPopoverProps) => {
79
79
  maxWidth,
80
80
  minHeight,
81
81
  minWidth,
82
- width,
83
82
  targetId,
84
83
  } = props;
85
84
 
@@ -98,8 +97,7 @@ const Popover = (props: PbPopoverProps) => {
98
97
  maxHeight ? { maxHeight: maxHeight } : {},
99
98
  maxWidth ? { maxWidth: maxWidth } : {},
100
99
  minHeight ? { minHeight: minHeight } : {},
101
- minWidth ? { minWidth: minWidth } : {},
102
- width ? { width: width } : {}
100
+ minWidth ? { minWidth: minWidth } : {}
103
101
  );
104
102
  };
105
103
  const ariaProps = buildAriaProps(aria);
@@ -169,7 +167,6 @@ const PbReactPopover = (props: PbPopoverProps): React.ReactElement => {
169
167
  maxWidth,
170
168
  minHeight,
171
169
  minWidth,
172
- width,
173
170
  } = props;
174
171
 
175
172
  useEffect(() => {
@@ -219,7 +216,6 @@ const PbReactPopover = (props: PbPopoverProps): React.ReactElement => {
219
216
  placement={placement}
220
217
  referenceElement={referenceElement}
221
218
  targetId={targetId}
222
- width={width}
223
219
  zIndex={zIndex}
224
220
  {...props}
225
221
  >
@@ -14,7 +14,7 @@
14
14
  trigger_element_id: "regular-popover-1",
15
15
  tooltip_id: "tooltip-1",
16
16
  offset: true,
17
- position: "top",
17
+ position: "top"
18
18
  }) do %>
19
19
  I'm a popover. I can show content of any size.
20
20
  <% end %>
@@ -12,7 +12,6 @@ module Playbook
12
12
  prop :max_width
13
13
  prop :min_width
14
14
  prop :min_height
15
- prop :width
16
15
  prop :z_index, type: Playbook::Props::String
17
16
  prop :offset, type: Playbook::Props::Boolean, default: false
18
17
  prop :close_on_click, type: Playbook::Props::Enum,
@@ -37,12 +36,11 @@ module Playbook
37
36
  out += "max-width: #{max_width}; " if max_width.present?
38
37
  out += "min-height: #{min_height}; " if min_height.present?
39
38
  out += "min-width: #{min_width};" if min_width.present?
40
- out += "width: #{width};" if width.present?
41
39
  out
42
40
  end
43
41
 
44
42
  def width_height_class_helper
45
- "overflow_handling" if max_height || max_width || width
43
+ "overflow_handling" if max_height || max_width
46
44
  end
47
45
 
48
46
  def data
@@ -1,15 +1,12 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
+
3
4
  import { buildCss, buildHtmlProps } from '../utilities/props'
4
- import { globalProps, GlobalProps } from "../utilities/globalProps"
5
+ import { globalProps, GlobalProps } from "../utilities/globalProps";
5
6
 
6
7
  import DateStacked from '../pb_date_stacked/_date_stacked'
7
8
  import IconCircle from '../pb_icon_circle/_icon_circle'
8
9
 
9
- import TimelineLabel from './subcomponents/Label'
10
- import TimelineStep from './subcomponents/Step'
11
- import TimelineDetail from './subcomponents/Detail'
12
-
13
10
  type ItemProps = {
14
11
  className?: string,
15
12
  children?: React.ReactNode[] | React.ReactNode,
@@ -20,13 +17,6 @@ type ItemProps = {
20
17
  lineStyle?: 'solid' | 'dotted',
21
18
  } & GlobalProps
22
19
 
23
- function isElementOfType<P>(
24
- element: React.ReactNode,
25
- component: React.ComponentType<P>
26
- ): element is React.ReactElement<P> {
27
- return React.isValidElement<P>(element) && element.type === component
28
- }
29
-
30
20
  const TimelineItem = ({
31
21
  className,
32
22
  children,
@@ -41,57 +31,31 @@ const TimelineItem = ({
41
31
 
42
32
  const htmlProps = buildHtmlProps(htmlOptions)
43
33
 
44
- const childrenArray = React.Children.toArray(children)
45
-
46
- const labelChild = childrenArray.find(
47
- (child): child is React.ReactElement => isElementOfType(child, TimelineLabel)
48
- )
49
-
50
- const stepChild = childrenArray.find(
51
- (child): child is React.ReactElement => isElementOfType(child, TimelineStep)
52
- )
53
-
54
- const detailChild = childrenArray.find(
55
- (child): child is React.ReactElement => isElementOfType(child, TimelineDetail)
56
- )
57
-
58
- const otherChildren = childrenArray.filter(
59
- (child) =>
60
- !isElementOfType(child, TimelineLabel) &&
61
- !isElementOfType(child, TimelineStep) &&
62
- !isElementOfType(child, TimelineDetail)
63
- )
64
-
65
34
  return (
66
- <div
35
+ <div
67
36
  {...htmlProps}
68
37
  className={classnames(timelineItemCss, globalProps(props), className)}
69
38
  >
70
- {labelChild || (
71
- <div className="pb_timeline_item_left_block">
72
- {date && (
73
- <DateStacked
74
- align="center"
75
- date={date}
76
- size="sm"
77
- />
78
- )}
79
- </div>
80
- )}
81
- {stepChild || (
82
- <div className="pb_timeline_item_step">
83
- <IconCircle icon={icon}
84
- size="xs"
85
- variant={iconColor}
86
- />
87
- <div className="pb_timeline_item_connector" />
88
- </div>
89
- )}
90
- {detailChild || (
91
- <div className="pb_timeline_item_right_block">
92
- { otherChildren }
93
- </div>
94
- )}
39
+ <div className="pb_timeline_item_left_block">
40
+ {date &&
41
+ <DateStacked
42
+ align="center"
43
+ date={date}
44
+ size="sm"
45
+ />
46
+ }
47
+ </div>
48
+ <div className="pb_timeline_item_step">
49
+ <IconCircle
50
+ icon={icon}
51
+ size="xs"
52
+ variant={iconColor}
53
+ />
54
+ <div className="pb_timeline_item_connector" />
55
+ </div>
56
+ <div className="pb_timeline_item_right_block">
57
+ {children}
58
+ </div>
95
59
  </div>
96
60
  )
97
61
  }
@@ -5,11 +5,6 @@ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../uti
5
5
  import { GlobalProps, globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import TimelineItem from './_item'
8
- import {
9
- TimelineStep,
10
- TimelineLabel,
11
- TimelineDetail,
12
- } from './subcomponents'
13
8
 
14
9
  type TimelineProps = {
15
10
  aria?: { [key: string]: string },
@@ -52,8 +47,5 @@ const Timeline = ({
52
47
  }
53
48
 
54
49
  Timeline.Item = TimelineItem
55
- Timeline.Step = TimelineStep
56
- Timeline.Label = TimelineLabel
57
- Timeline.Detail = TimelineDetail
58
50
 
59
51
  export default Timeline
@@ -4,11 +4,10 @@ examples:
4
4
  - timeline_default: Default
5
5
  - timeline_vertical: Vertical
6
6
  - timeline_with_date: With Date
7
- - timeline_with_children: With Children
8
7
 
9
8
 
10
9
  react:
11
10
  - timeline_default: Default
12
11
  - timeline_vertical: Vertical
13
12
  - timeline_with_date: With Date
14
- - timeline_with_children: With Children
13
+
@@ -1,4 +1,3 @@
1
1
  export { default as TimelineDefault } from './_timeline_default.jsx'
2
2
  export { default as TimelineVertical } from './_timeline_vertical.jsx'
3
3
  export { default as TimelineWithDate } from './_timeline_with_date.jsx'
4
- export { default as TimelineWithChildren } from './_timeline_with_children.jsx'
@@ -1,21 +1,25 @@
1
1
  <%= pb_content_tag do %>
2
- <% if date_area %>
3
- <%= date_area %>
4
- <% else %>
5
- <%= pb_rails("timeline/date_area", props: { date: date }) %>
6
- <% end %>
7
2
 
8
- <% if node_area %>
9
- <%= node_area %>
10
- <% else %>
11
- <%= pb_rails("timeline/node_area", props: { icon: icon, icon_color: icon_color }) %>
12
- <% end %>
13
-
14
- <% if detail_area %>
15
- <%= detail_area %>
16
- <% else %>
17
- <%= pb_rails("timeline/detail_area") do %>
18
- <%= content %>
3
+ <div class="pb_timeline_item_left_block">
4
+ <% if object.date.present? %>
5
+ <%= pb_rails("date_stacked", props: {
6
+ date: object.date,
7
+ size: "sm",
8
+ align: "center"
9
+ }) %>
19
10
  <% end %>
20
- <% end %>
11
+ </div>
12
+
13
+ <div class="pb_timeline_item_step">
14
+ <%= pb_rails("icon_circle", props: {
15
+ icon: object.icon,
16
+ variant: object.icon_color,
17
+ size: "xs"
18
+ }) %>
19
+ <div class="pb_timeline_item_connector"></div>
20
+ </div>
21
+
22
+ <div class="pb_timeline_item_right_block">
23
+ <%= content.presence %>
24
+ </div>
21
25
  <% end %>
@@ -13,10 +13,6 @@ module Playbook
13
13
  values: %w[solid dotted],
14
14
  default: "solid"
15
15
 
16
- renders_one :date_area
17
- renders_one :node_area
18
- renders_one :detail_area
19
-
20
16
  def classname
21
17
  generate_classname("pb_timeline_item_kit", line_style)
22
18
  end
@@ -2,10 +2,6 @@ import React from 'react'
2
2
  import { render, screen } from '../utilities/test-utils'
3
3
 
4
4
  import Timeline from './_timeline'
5
- import TimelineItem from './_item'
6
- import TimelineLabel from './subcomponents/Label'
7
- import TimelineStep from './subcoponents/Step'
8
- import TimelineDetail from './subcomponents/Detail'
9
5
  import TitleDetail from '../pb_title_detail/_title_detail'
10
6
 
11
7
  const testId = 'timeline'
@@ -47,91 +43,18 @@ const TimelineDefault = (props) => (
47
43
  </>
48
44
  )
49
45
 
50
- const TimelineWithChildren = (props) => (
51
- <>
52
- <Timeline
53
- className={className}
54
- data={{ testid: testId }}
55
- orientation="horizontal"
56
- showDate
57
- {...props}
58
- >
59
- <TimelineItem lineStyle="solid"
60
- {...props}
61
- >
62
- <TimelineLabel date={new Date()} />
63
- <TimelineStep icon="user"
64
- iconColor="royal"
65
- />
66
- <TimelineDetail>
67
- <TitleDetail
68
- detail="37-27 74th Street"
69
- title="Jackson Heights"
70
- {...props}
71
- />
72
- </TimelineDetail>
73
- </TimelineItem>
74
-
75
- <TimelineItem lineStyle="dotted"
76
- {...props}
77
- >
78
- <TimelineStep icon="check"
79
- iconColor="teal"
80
- />
81
- <TimelineDetail>
82
- <TitleDetail
83
- detail="81 Gate St Brooklyn"
84
- title="Greenpoint"
85
- {...props}
86
- />
87
- </TimelineDetail>
88
- </TimelineItem>
89
-
90
- <TimelineItem lineStyle="solid"
91
- {...props}
92
- >
93
- <TimelineLabel
94
- date={new Date(new Date().setDate(new Date().getDate() + 1))}
95
- />
96
- <TimelineStep icon="map-marker-alt"
97
- iconColor="purple"
98
- />
99
- <TimelineDetail>
100
- <TitleDetail
101
- detail="72 E St Astoria"
102
- title="Society Hill"
103
- {...props}
104
- />
105
- </TimelineDetail>
106
- </TimelineItem>
107
- </Timeline>
108
- </>
109
- )
110
-
111
46
  test('should pass data prop', () => {
112
47
  render(<TimelineDefault />)
113
48
  const kit = screen.getByTestId(testId)
114
49
  expect(kit).toBeInTheDocument()
115
50
  })
116
51
 
117
- test('should pass data prop using children', () => {
118
- render(<TimelineWithChildren />)
119
- const kit = screen.getByTestId(testId)
120
- expect(kit).toBeInTheDocument()
121
- })
122
-
123
52
  test('should pass className prop', () => {
124
53
  render(<TimelineDefault />)
125
54
  const kit = screen.getByTestId(testId)
126
55
  expect(kit).toHaveClass(className)
127
56
  })
128
57
 
129
- test('should pass className prop with children', () => {
130
- render(<TimelineWithChildren />)
131
- const kit = screen.getByTestId(testId)
132
- expect(kit).toHaveClass(className)
133
- })
134
-
135
58
  test('should pass aria prop', () => {
136
59
  render(<TimelineDefault />)
137
60
  const kit = screen.getByTestId(testId)
@@ -163,10 +86,3 @@ test('should pass showDate prop', () => {
163
86
  const kit = screen.getByTestId(testId)
164
87
  expect(kit).toHaveClass('pb_timeline_kit__horizontal__with_date')
165
88
  })
166
-
167
- test('should pass showDate prop with Children', () => {
168
- const props = { showDate: true }
169
- render(<TimelineWithChildren {...props} />)
170
- const kit = screen.getByTestId(testId)
171
- expect(kit).toHaveClass('pb_timeline_kit__horizontal__with_date')
172
- })
@@ -136,15 +136,12 @@ const Typeahead = ({
136
136
  }
137
137
  }
138
138
 
139
- const filteredProps: TypeaheadProps = {...props}
140
- delete filteredProps.truncate
141
-
142
139
  const dataProps = buildDataProps(data)
143
140
  const htmlProps = buildHtmlProps(htmlOptions)
144
141
  const classes = classnames(
145
142
  'pb_typeahead_kit react-select',
146
143
  `mb_${marginBottom}`,
147
- globalProps(filteredProps),
144
+ globalProps(props),
148
145
  className
149
146
  )
150
147
 
@@ -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
  }
@@ -65,10 +65,10 @@ module Playbook
65
65
  def typeahead_react_options
66
66
  base_options = {
67
67
  className: classname,
68
+ pillColor: pill_color,
68
69
  dark: dark,
69
70
  defaultValue: default_options,
70
71
  error: error,
71
- htmlOptions: html_options,
72
72
  id: id,
73
73
  inline: inline,
74
74
  isMulti: is_multi,
@@ -77,10 +77,8 @@ module Playbook
77
77
  multiKit: multi_kit,
78
78
  name: name,
79
79
  options: options,
80
- pillColor: pill_color,
81
80
  placeholder: placeholder,
82
81
  plusIcon: plus_icon,
83
- truncate: truncate,
84
82
  }
85
83
 
86
84
  base_options[:getOptionLabel] = get_option_label if get_option_label.present?
@@ -1,7 +1,4 @@
1
1
  export default [
2
- "minHeight",
3
- "maxHeight",
4
- "height",
5
2
  "left",
6
3
  "bottom",
7
4
  "right",
@@ -170,24 +170,12 @@ type ZIndex = {
170
170
  zIndex?: ZIndexType,
171
171
  } | ZIndexResponsiveType
172
172
 
173
- type Height = {
174
- height?: string
175
- }
176
-
177
- type MaxHeight = {
178
- maxHeight?: string
179
- }
180
-
181
- type MinHeight = {
182
- minHeight?: string
183
- }
184
-
185
173
  // keep this as the last type definition
186
174
  export type GlobalProps = AlignContent & AlignItems & AlignSelf &
187
175
  BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
188
176
  FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
189
177
  LineHeight & Margin & MinWidth & MaxWidth & NumberSpacing & Order & Overflow & Padding &
190
- Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left & Height & MaxHeight & MinHeight;
178
+ Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left;
191
179
 
192
180
  const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
193
181
  const keys: string[] = Object.keys(prop)
@@ -510,22 +498,7 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
510
498
  } else {
511
499
  return verticalAlign ? `vertical_align_${verticalAlign} ` : ''
512
500
  }
513
- },
514
-
515
- }
516
-
517
- const PROP_INLINE_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => {[key: string]: any}} = {
518
- heightProps: ({ height }: Height) => {
519
- return height ? { height } : {};
520
- },
521
-
522
- maxHeightProps: ({ maxHeight }: MaxHeight) => {
523
- return maxHeight ? { maxHeight } : {};
524
- },
525
-
526
- minHeightProps: ({ minHeight }: MinHeight) => {
527
- return minHeight ? { minHeight } : {};
528
- },
501
+ }
529
502
  }
530
503
 
531
504
  type DefaultProps = {[key: string]: string} | Record<string, unknown>
@@ -537,16 +510,6 @@ export const globalProps = (props: GlobalProps, defaultProps: DefaultProps = {})
537
510
  }).filter((value) => value?.length > 0).join(" ")
538
511
  }
539
512
 
540
- // New function for inline styles
541
- export const globalInlineProps = (props: GlobalProps): React.CSSProperties => {
542
- const styles = Object.keys(PROP_INLINE_CATEGORIES).reduce((acc, key) => {
543
- const result = PROP_INLINE_CATEGORIES[key](props);
544
- return { ...acc, ...(typeof result === 'object' ? result : {}) }; // Ensure result is an object before spreading
545
- }, {});
546
-
547
- return styles; // Return the styles object directly
548
- }
549
-
550
513
 
551
514
  export const deprecatedProps = (): void => {
552
515
  // if (process.env.NODE_ENV === 'development') {