playbook_ui 14.4.0.pre.alpha.PBNTR534filtermaxwidth3903 → 14.4.0.pre.alpha.PBNTR550typeaheadformpilltruncate3895

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d19b0edff349ceaf5715d4d3312adfa00bea94690997444a35de043e1ffa4098
4
- data.tar.gz: 381e6e97dc1c9b9ddac851087629c0521400a73237ae530cca4de84e1e49f319
3
+ metadata.gz: c6aac1da17236064490c7bb4ee36b45c253608e418af00cc8ce01d9704ab3b52
4
+ data.tar.gz: 579a2f877566a884c34e7ba6838bb6d45e40b3ece38cf43da3683d4f1f6c128e
5
5
  SHA512:
6
- metadata.gz: bf448459473c583fa91ab9903a5ae4740b6ec926b5a1263c1285790fbd2bab360a7957627ff127230aa2b3570e268a56bce0dd5f86b88f0ff01d55249b2feec9
7
- data.tar.gz: dda0adae3948fa7113716a0c70fd8a27e4bb880958f6d48d2ff7107767d4d01f6facccfdd2a018c1f63ffffce52670c6dd4c953f37569354e324a554be8d2bf8
6
+ metadata.gz: 3df47bbec17dcd38e0d345fd3b9d00e96af4cc45e08bb857173f88620aab7f67b21c474372922eed548cfc74a17b5fa19a43152ead0dd821d6750db0ca639626
7
+ data.tar.gz: 1d72e78a5430be2711313f1515483cd059f741d983933ec76a4bb396dfe9c7b9f19110235ee08d2cd7cafade05182e5798a742ba41afcd12629472fdc5b3407f
@@ -71,7 +71,7 @@
71
71
  <% end %>
72
72
 
73
73
  <% if object.template != "sort_only"%>
74
- <%= pb_rails("popover", props: {max_height: object.max_height, min_width: object.min_width, max_width: object.max_width, close_on_click: "outside", trigger_element_id: "filter#{object.id}", tooltip_id: "filter-form#{object.id}", position: object.placement }) do %>
74
+ <%= pb_rails("popover", props: {max_height: object.max_height, min_width: object.min_width, close_on_click: "outside", trigger_element_id: "filter#{object.id}", tooltip_id: "filter-form#{object.id}", position: object.placement }) do %>
75
75
  <%= content %>
76
76
  <% end %>
77
77
  <%end%>
@@ -12,7 +12,6 @@ module Playbook
12
12
  prop :background, type: Playbook::Props::Boolean, default: true
13
13
  prop :max_height
14
14
  prop :min_width, default: "auto"
15
- prop :max_width
16
15
  prop :placement, type: Playbook::Props::Enum,
17
16
  values: %w[top bottom left right top-start top-end bottom-start bottom-end right-start right-end left-start left-end],
18
17
  default: "bottom-start"
@@ -47,9 +47,13 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
47
47
 
48
48
  const iconClass = icon ? "_icon" : ""
49
49
  const closeIconSize = size === "small" ? "xs" : "sm"
50
+
51
+ const filteredProps: FormPillProps = {...props}
52
+ delete filteredProps.truncate
53
+
50
54
  const css = classnames(
51
55
  `pb_form_pill_kit_${color}${iconClass}`,
52
- globalProps(props),
56
+ globalProps(filteredProps),
53
57
  className,
54
58
  size === 'small' ? 'small' : null,
55
59
  textTransform,
@@ -77,6 +81,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
77
81
  className="pb_form_pill_text"
78
82
  size={4}
79
83
  text={name}
84
+ truncate={props.truncate}
80
85
  />
81
86
  </>
82
87
  )}
@@ -92,6 +97,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
92
97
  className="pb_form_pill_text"
93
98
  size={4}
94
99
  text={name}
100
+ truncate={props.truncate}
95
101
  />
96
102
  <Icon
97
103
  className="pb_form_pill_icon"
@@ -111,6 +117,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
111
117
  className="pb_form_pill_tag"
112
118
  size={4}
113
119
  text={text}
120
+ truncate={props.truncate}
114
121
  />
115
122
  </>
116
123
  )}
@@ -119,6 +126,7 @@ const FormPill = (props: FormPillProps): React.ReactElement => {
119
126
  className="pb_form_pill_tag"
120
127
  size={4}
121
128
  text={text}
129
+ truncate={props.truncate}
122
130
  />
123
131
  )}
124
132
  <div
@@ -136,12 +136,15 @@ const Typeahead = ({
136
136
  }
137
137
  }
138
138
 
139
+ const filteredProps: TypeaheadProps = {...props}
140
+ delete filteredProps.truncate
141
+
139
142
  const dataProps = buildDataProps(data)
140
143
  const htmlProps = buildHtmlProps(htmlOptions)
141
144
  const classes = classnames(
142
145
  'pb_typeahead_kit react-select',
143
146
  `mb_${marginBottom}`,
144
- globalProps(props),
147
+ globalProps(filteredProps),
145
148
  className
146
149
  )
147
150
 
@@ -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 } = props.selectProps
19
+ const { dark, multiKit, pillColor, truncate } = props.selectProps
20
20
 
21
21
  const formPillProps = {
22
22
  marginRight: 'xs',
@@ -51,6 +51,7 @@ const MultiValue = (props: Props) => {
51
51
  name={label}
52
52
  size={multiKit === 'smallPill' ? 'small' : ''}
53
53
  text=''
54
+ truncate={truncate}
54
55
  {...props}
55
56
  />
56
57
  }
@@ -64,6 +65,7 @@ const MultiValue = (props: Props) => {
64
65
  name=''
65
66
  size={multiKit === 'smallPill' ? 'small' : ''}
66
67
  text={label}
68
+ truncate={truncate}
67
69
  {...props}
68
70
  />
69
71
  }