playbook_ui 13.15.0.pre.alpha.PLAY11311893 → 13.15.0.pre.alpha.play10841940

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
  3. data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -1
  4. data/app/pb_kits/playbook/pb_layout/layout.test.js +8 -4
  5. data/app/pb_kits/playbook/pb_legend/_legend.tsx +6 -6
  6. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.tsx +4 -4
  7. data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.tsx +1 -1
  8. data/app/pb_kits/playbook/pb_lightbox/Carousel/index.tsx +3 -3
  9. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +30 -22
  10. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +5 -5
  11. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +4 -4
  12. data/app/pb_kits/playbook/pb_list/_list.tsx +15 -15
  13. data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
  14. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +9 -9
  15. data/app/pb_kits/playbook/pb_map/_map.tsx +8 -8
  16. data/app/pb_kits/playbook/pb_map/_map_controls.tsx +15 -7
  17. data/app/pb_kits/playbook/pb_map/_map_custom_button.tsx +4 -2
  18. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
  19. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +6 -6
  20. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +46 -42
  21. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +20 -20
  22. data/app/pb_kits/playbook/pb_nav/_item.tsx +56 -47
  23. data/app/pb_kits/playbook/pb_nav/_nav.tsx +15 -15
  24. data/app/pb_kits/playbook/pb_select/_select.scss +4 -13
  25. data/app/pb_kits/playbook/pb_select/_select.tsx +4 -7
  26. data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -2
  27. data/app/pb_kits/playbook/pb_select/docs/index.js +0 -1
  28. data/app/pb_kits/playbook/pb_select/select.rb +1 -6
  29. data/dist/playbook-rails.js +1 -1
  30. data/lib/playbook/version.rb +1 -1
  31. metadata +2 -4
  32. data/app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.html.erb +0 -24
  33. data/app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.jsx +0 -38
@@ -44,11 +44,11 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
44
44
  return users.slice(0, 1).map((userObject, index) => {
45
45
  return (
46
46
  <Avatar
47
- {...userObject}
48
- className="pb_multiple_users_stacked_item"
49
- dark={dark}
50
- key={index}
51
- size="xs"
47
+ {...userObject}
48
+ className="pb_multiple_users_stacked_item"
49
+ dark={dark}
50
+ key={index}
51
+ size="xs"
52
52
  />
53
53
  )
54
54
  })
@@ -59,11 +59,11 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
59
59
  return users.slice(1, 2).map((userObject, index) => {
60
60
  return (
61
61
  <Avatar
62
- {...userObject}
63
- className="pb_multiple_users_stacked_item second_item"
64
- dark={dark}
65
- key={index}
66
- size="xs"
62
+ {...userObject}
63
+ className="pb_multiple_users_stacked_item second_item"
64
+ dark={dark}
65
+ key={index}
66
+ size="xs"
67
67
  />
68
68
  )
69
69
  })
@@ -74,11 +74,11 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
74
74
  if (moreThanTwo === true) {
75
75
  return (
76
76
  <Badge
77
- className="pb_multiple_users_stacked_item second_item"
78
- dark={dark}
79
- rounded
80
- text={`+${users.length - displayCount()}`}
81
- variant="primary"
77
+ className="pb_multiple_users_stacked_item second_item"
78
+ dark={dark}
79
+ rounded
80
+ text={`+${users.length - displayCount()}`}
81
+ variant="primary"
82
82
  />
83
83
  )
84
84
  }
@@ -86,11 +86,11 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
86
86
 
87
87
  return (
88
88
  <div
89
- {...ariaProps}
90
- {...dataProps}
91
- {...htmlProps}
92
- className={classes}
93
- id={id}
89
+ {...ariaProps}
90
+ {...dataProps}
91
+ {...htmlProps}
92
+ className={classes}
93
+ id={id}
94
94
  >
95
95
  {firstUser()}
96
96
  {secondUser()}
@@ -18,7 +18,7 @@ type NavItemProps = {
18
18
  children?: React.ReactNode[] | React.ReactNode;
19
19
  className?: string;
20
20
  collapsible?: boolean;
21
- data?: object;
21
+ data?: Record<string, unknown>;
22
22
  dark?: boolean;
23
23
  fontSize?: "normal" | "small";
24
24
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
@@ -76,7 +76,7 @@ const NavItem = (props: NavItemProps) => {
76
76
  id,
77
77
  imageUrl,
78
78
  link,
79
- onClick = () => {},
79
+ onClick,
80
80
  target = "_self",
81
81
  text = "",
82
82
  collapsibleTrail,
@@ -205,46 +205,49 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
205
205
  {collapsible ? (
206
206
  <>
207
207
  <Collapsible
208
- className={collapsibleClasses}
209
- icon={iconRight && iconRight}
210
- iconSize="xs"
211
- id={id}
212
- collapsed={collapsed}
213
- onIconClick={onIconRightClick}
214
- onClick={onClick}
208
+ className={collapsibleClasses}
209
+ collapsed={collapsed}
210
+ icon={iconRight && iconRight}
211
+ iconSize="xs"
212
+ id={id}
213
+ onClick={onClick}
214
+ onIconClick={onIconRightClick}
215
215
  >
216
216
  <Collapsible.Main
217
- className={globalProps({ ...finalItemSpacing })}
218
- dark={dark}>
217
+ className={globalProps({ ...finalItemSpacing })}
218
+ dark={dark}
219
+ >
219
220
  <Tag
220
- {...ariaProps}
221
- {...dataProps}
222
- {...htmlProps}
223
- className={classes}
224
- id={id}
225
- href={link}
226
- target={target}
221
+ {...ariaProps}
222
+ {...dataProps}
223
+ {...htmlProps}
224
+ className={classes}
225
+ href={link}
226
+ id={id}
227
+ target={target}
227
228
  >
228
229
  {imageUrl && (
229
230
  <div
230
- className="pb_nav_list_item_icon_section_collapsible"
231
- key={imageUrl}
232
- onClick={(e) => handleIconClick(e)}
231
+ className="pb_nav_list_item_icon_section_collapsible"
232
+ key={imageUrl}
233
+ onClick={(e) => handleIconClick(e)}
233
234
  >
234
- <Image className="pb_nav_img_wrapper" url={imageUrl} />
235
+ <Image className="pb_nav_img_wrapper"
236
+ url={imageUrl}
237
+ />
235
238
  </div>
236
239
  )}
237
240
 
238
241
  {iconLeft && (
239
242
  <div
240
- className="pb_nav_list_item_icon_section_collapsible"
241
- key={iconLeft}
242
- onClick={(e) => handleIconClick(e)}
243
+ className="pb_nav_list_item_icon_section_collapsible"
244
+ key={iconLeft}
245
+ onClick={(e) => handleIconClick(e)}
243
246
  >
244
247
  <Icon
245
- className="pb_nav_list_item_icon_left_collapsible"
246
- fixedWidth
247
- icon={iconLeft}
248
+ className="pb_nav_list_item_icon_left_collapsible"
249
+ fixedWidth
250
+ icon={iconLeft}
248
251
  />
249
252
  </div>
250
253
  )}
@@ -258,27 +261,33 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
258
261
  </>
259
262
  ) : (
260
263
  <Tag
261
- {...ariaProps}
262
- {...dataProps}
263
- {...htmlProps}
264
- className={classes}
265
- id={id}
266
- href={link}
267
- onClick={onClick}
268
- target={target}
264
+ {...ariaProps}
265
+ {...dataProps}
266
+ {...htmlProps}
267
+ className={classes}
268
+ href={link}
269
+ id={id}
270
+ onClick={onClick}
271
+ target={target}
269
272
  >
270
273
  {imageUrl && (
271
- <div className="pb_nav_list_item_icon_section" key={imageUrl}>
272
- <Image className="pb_nav_img_wrapper" url={imageUrl} />
274
+ <div className="pb_nav_list_item_icon_section"
275
+ key={imageUrl}
276
+ >
277
+ <Image className="pb_nav_img_wrapper"
278
+ url={imageUrl}
279
+ />
273
280
  </div>
274
281
  )}
275
282
 
276
283
  {iconLeft && (
277
- <div className="pb_nav_list_item_icon_section" key={iconLeft}>
284
+ <div className="pb_nav_list_item_icon_section"
285
+ key={iconLeft}
286
+ >
278
287
  <Icon
279
- className="pb_nav_list_item_icon_left"
280
- fixedWidth
281
- icon={iconLeft}
288
+ className="pb_nav_list_item_icon_left"
289
+ fixedWidth
290
+ icon={iconLeft}
282
291
  />
283
292
  </div>
284
293
  )}
@@ -287,13 +296,13 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
287
296
 
288
297
  {iconRight && (
289
298
  <div
290
- className="pb_nav_list_item_icon_section"
291
- key={iconRight as string}
299
+ className="pb_nav_list_item_icon_section"
300
+ key={iconRight as string}
292
301
  >
293
302
  <Icon
294
- className="pb_nav_list_item_icon_right"
295
- fixedWidth
296
- icon={iconRight as string}
303
+ className="pb_nav_list_item_icon_right"
304
+ fixedWidth
305
+ icon={iconRight as string}
297
306
  />
298
307
  </div>
299
308
  )}
@@ -12,12 +12,12 @@ type NavProps = {
12
12
  borderless?: boolean,
13
13
  children?: React.ReactNode[] | React.ReactNode,
14
14
  className?: string | string[],
15
- data?: object,
15
+ data?: Record<string, unknown>,
16
16
  dark?: boolean,
17
17
  highlight?: boolean,
18
18
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
19
19
  id?: string,
20
- onClick?: React.MouseEventHandler<HTMLElement>,
20
+ onClick?: () => void,
21
21
  orientation?: "vertical" | "horizontal",
22
22
  link?: string,
23
23
  title?: string,
@@ -25,7 +25,7 @@ type NavProps = {
25
25
  itemSpacing?: SpacingObject
26
26
  } & GlobalProps
27
27
 
28
- const Nav = (props: NavProps) => {
28
+ const Nav = (props: NavProps): React.ReactElement => {
29
29
  const {
30
30
  aria = {},
31
31
  borderless = false,
@@ -37,7 +37,7 @@ const Nav = (props: NavProps) => {
37
37
  htmlOptions = {},
38
38
  id,
39
39
  link = '#',
40
- onClick = () => { },
40
+ onClick,
41
41
  orientation = 'vertical',
42
42
  title = '',
43
43
  variant = 'normal',
@@ -71,23 +71,23 @@ const childrenWithProps = React.Children.map(children, (child) => {
71
71
 
72
72
  return (
73
73
  <nav
74
- {...ariaProps}
75
- {...dataProps}
76
- {...htmlProps}
77
- className={cardCss}
78
- id={id}
74
+ {...ariaProps}
75
+ {...dataProps}
76
+ {...htmlProps}
77
+ className={cardCss}
78
+ id={id}
79
79
  >
80
80
  {title &&
81
81
  <div className="pb_nav_list_title">
82
82
  <a
83
- className="pb_nav_list_item_link_text"
84
- href={link}
85
- onClick={onClick}
83
+ className="pb_nav_list_item_link_text"
84
+ href={link}
85
+ onClick={onClick}
86
86
  >
87
87
  <Caption
88
- dark={dark}
89
- size="md"
90
- text={`${title}`}
88
+ dark={dark}
89
+ size="md"
90
+ text={`${title}`}
91
91
  />
92
92
  </a>
93
93
  </div>
@@ -102,29 +102,20 @@
102
102
  pointer-events: none;
103
103
  }
104
104
  &.inline {
105
- @mixin active_arrow_style {
106
- svg {
107
- color: $primary !important;
108
- font-size: 16px;
109
- }
110
- }
111
105
  &:not(:hover) {
112
106
  svg {
113
107
  display: none;
114
108
  }
115
109
  }
116
- &.show_arrow:not(:hover) {
117
- svg {
118
- display: block;
119
- }
120
- @include active_arrow_style();
121
- }
122
110
  &:hover {
123
- @include active_arrow_style();
124
111
  select {
125
112
  color: $primary !important;
126
113
  background: rgba(0,130,255,0.1);
127
114
  }
115
+ svg {
116
+ color: $primary !important;
117
+ font-size: 16px;
118
+ }
128
119
  }
129
120
  select {
130
121
  box-shadow: none;
@@ -36,7 +36,6 @@ type SelectProps = {
36
36
  onChange: InputCallback<HTMLSelectElement>,
37
37
  options: SelectOption[],
38
38
  required?: boolean,
39
- showArrow?: boolean,
40
39
  value?: string,
41
40
  } & GlobalProps
42
41
 
@@ -64,10 +63,9 @@ const Select = ({
64
63
  inline = false,
65
64
  multiple = false,
66
65
  name,
67
- onChange = () => undefined,
66
+ onChange = () => {},
68
67
  options = [],
69
68
  required = false,
70
- showArrow = false,
71
69
  value,
72
70
  ...props
73
71
  }: SelectProps, ref: React.LegacyRef<HTMLSelectElement>) => {
@@ -79,16 +77,15 @@ const Select = ({
79
77
  const inlineClass = inline ? 'inline' : null
80
78
  const compactClass = compact ? 'compact' : null
81
79
  const classes = classnames(
82
- buildCss("pb_select"),
80
+ buildCss('pb_select'),
83
81
  globalProps({
84
82
  ...props,
85
- marginBottom: props.marginBottom || props.margin || "sm",
83
+ marginBottom: props.marginBottom || props.margin || 'sm',
86
84
  }),
87
85
  className,
88
86
  inlineClass,
89
- { show_arrow: showArrow },
90
87
  compactClass
91
- );
88
+ )
92
89
 
93
90
  const selectWrapperClass = classnames(buildCss('pb_select_kit_wrapper'), { error }, className)
94
91
  const selectBody =(() =>{
@@ -10,7 +10,6 @@ examples:
10
10
  - select_custom_select: Custom Select
11
11
  - select_error: Select w/ Error
12
12
  - select_inline: Select Inline
13
- - select_inline_show_arrow: Select Inline (Always Show Arrow)
14
13
  - select_inline_compact: Select Inline Compact
15
14
  - select_attributes: Select W/ Attributes
16
15
  - select_multiple: Select Multiple
@@ -27,7 +26,6 @@ examples:
27
26
  - select_custom_select: Custom Select
28
27
  - select_error: Select w/ Error
29
28
  - select_inline: Select Inline
30
- - select_inline_show_arrow: Select Inline (Always Show Arrow)
31
29
  - select_inline_compact: Select Inline Compact
32
30
  - select_multiple: Select Multiple
33
31
 
@@ -7,6 +7,5 @@ export { default as SelectCustomSelect } from './_select_custom_select.jsx'
7
7
  export { default as SelectValueTextSame } from './_select_value_text_same.jsx'
8
8
  export { default as SelectError } from './_select_error.jsx'
9
9
  export { default as SelectInline } from './_select_inline.jsx'
10
- export { default as SelectInlineShowArrow } from './_select_inline_show_arrow.jsx'
11
10
  export { default as SelectInlineCompact } from './_select_inline_compact.jsx'
12
11
  export { default as SelectMultiple } from './_select_multiple.jsx'
@@ -19,11 +19,10 @@ module Playbook
19
19
  prop :name
20
20
  prop :onchange
21
21
  prop :options, type: Playbook::Props::HashArray, required: false, default: []
22
- prop :show_arrow, type: Playbook::Props::Boolean, default: false
23
22
  prop :required, type: Playbook::Props::Boolean, default: false
24
23
 
25
24
  def classnames
26
- classname + inline_class + compact_class + show_arrow_class
25
+ classname + inline_class + compact_class
27
26
  end
28
27
 
29
28
  def all_attributes
@@ -50,10 +49,6 @@ module Playbook
50
49
  compact ? "compact" : ""
51
50
  end
52
51
 
53
- def show_arrow_class
54
- show_arrow ? "show_arrow" : ""
55
- end
56
-
57
52
  def select_wrapper_class
58
53
  "pb_select_kit_wrapper" + error_class
59
54
  end