playbook_ui 13.29.0.pre.alpha.testingcollapsibleissue3052 → 13.30.0.pre.alpha.PBNTR353draggablev53136

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/index.js +1 -0
  4. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +58 -0
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +68 -0
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +2 -0
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
  8. data/app/pb_kits/playbook/pb_card/_card.scss +5 -0
  9. data/app/pb_kits/playbook/pb_card/_card.tsx +57 -9
  10. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +9 -5
  11. data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +2 -3
  12. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +2 -4
  13. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +70 -50
  14. data/app/pb_kits/playbook/pb_draggable/context/types.ts +26 -0
  15. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +3 -2
  16. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +2 -2
  17. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +13 -8
  18. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.md +1 -0
  19. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +23 -35
  20. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +5 -0
  21. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +7 -7
  22. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +7 -1
  23. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +11 -9
  24. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md +7 -0
  25. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +143 -18
  26. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +6 -5
  27. data/app/pb_kits/playbook/pb_list/_list.tsx +4 -4
  28. data/app/pb_kits/playbook/pb_list/_list_item.tsx +7 -3
  29. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +72 -0
  30. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +78 -0
  31. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb +24 -0
  32. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx +40 -0
  33. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +7 -0
  34. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb +11 -0
  35. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx +36 -0
  36. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md +5 -0
  37. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +8 -0
  38. data/app/pb_kits/playbook/pb_overlay/docs/index.js +2 -0
  39. data/app/pb_kits/playbook/pb_overlay/overlay.html.erb +27 -0
  40. data/app/pb_kits/playbook/pb_overlay/overlay.rb +110 -0
  41. data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +66 -0
  42. data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_percentage.tsx +57 -0
  43. data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +48 -0
  44. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +43 -25
  45. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +7 -3
  46. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +3 -3
  47. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.html.erb +32 -33
  48. data/app/pb_kits/playbook/pb_table/table_header.html.erb +0 -2
  49. data/app/pb_kits/playbook/pb_timeline/_item.tsx +11 -10
  50. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +8 -6
  51. data/app/pb_kits/playbook/playbook-doc.js +2 -0
  52. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -0
  53. data/dist/menu.yml +5 -1
  54. data/dist/playbook-rails.js +6 -6
  55. data/lib/playbook/kit_base.rb +19 -0
  56. data/lib/playbook/version.rb +2 -2
  57. metadata +23 -2
@@ -1,34 +1,33 @@
1
- <%= pb_rails("table") do %>
2
- <thead>
3
- <tr>
4
- <th>Column 1</th>
5
- <th>Column 2</th>
6
- <th>Column 3</th>
7
- <th align="center">Rating</th>
8
- <th align="right">Money</th>
9
- </tr>
10
- </thead>
11
- <tbody>
12
- <tr>
13
- <td>Value 1</td>
14
- <td>Value 2</td>
15
- <td>Value 3</td>
16
- <td align="center">3</td>
17
- <td align="right">$57.32</td>
18
- </tr>
19
- <tr>
20
- <td>Value 1</td>
21
- <td>Value 2</td>
22
- <td>Value 3</td>
23
- <td align="center">2</td>
24
- <td align="right">$5,657.08</td>
25
- </tr>
26
- <tr>
27
- <td>Value 1</td>
28
- <td>Value 2</td>
29
- <td>Value 3</td>
30
- <td align="center">4</td>
31
- <td align="right">$358.77</td>
32
- </tr>
33
- </tbody>
1
+ <%= pb_rails("table") do %> <%= pb_rails("table/table_head") do %>
2
+ <%= pb_rails("table/table_row") do %>
3
+ <%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
4
+ <%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
5
+ <%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
6
+ <%= pb_rails("table/table_header", props: { text: "Rating", text_align: "center" }) %>
7
+ <%= pb_rails("table/table_header", props: { text: "Money", text_align: "right" }) %>
8
+ <% end %>
9
+ <% end %>
10
+ <%= pb_rails("table/table_body") do %>
11
+ <%= pb_rails("table/table_row") do %>
12
+ <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
13
+ <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
14
+ <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
15
+ <%= pb_rails("table/table_cell", props: { text: "3", text_align: "center" }) %>
16
+ <%= pb_rails("table/table_cell", props: { text: "$57.32", text_align: "right" }) %>
17
+ <% end %>
18
+ <%= pb_rails("table/table_row") do %>
19
+ <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
20
+ <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
21
+ <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
22
+ <%= pb_rails("table/table_cell", props: { text: "2", text_align: "center" }) %>
23
+ <%= pb_rails("table/table_cell", props: { text: "$5,657.08", text_align: "right" }) %>
24
+ <% end %>
25
+ <%= pb_rails("table/table_row") do %>
26
+ <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
27
+ <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
28
+ <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
29
+ <%= pb_rails("table/table_cell", props: { text: "4", text_align: "center" }) %>
30
+ <%= pb_rails("table/table_cell", props: { text: "$358.77", text_align: "right" }) %>
31
+ <% end %>
32
+ <% end %>
34
33
  <% end %>
@@ -7,9 +7,7 @@
7
7
  id: "pb-th#{object.id}",
8
8
  **combined_html_options) do %>
9
9
  <% unless sorting_style? %>
10
- <%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_nolink" }) do %>
11
10
  <%= content.presence || object.text %>
12
- <% end %>
13
11
  <% else %>
14
12
  <%= link_to next_link, style: link_style do %>
15
13
  <%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_link" }) do %>
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { buildCss, buildHtmlProps } from '../utilities/props'
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'
@@ -14,7 +15,7 @@ type ItemProps = {
14
15
  icon?: string,
15
16
  iconColor?: 'default' | 'royal' | 'blue' | 'purple' | 'teal' | 'red' | 'yellow' | 'green',
16
17
  lineStyle?: 'solid' | 'dotted',
17
- }
18
+ } & GlobalProps
18
19
 
19
20
  const TimelineItem = ({
20
21
  className,
@@ -24,7 +25,7 @@ const TimelineItem = ({
24
25
  icon = 'user',
25
26
  iconColor = 'default',
26
27
  lineStyle = 'solid',
27
-
28
+ ...props
28
29
  }: ItemProps) => {
29
30
  const timelineItemCss = buildCss('pb_timeline_item_kit', lineStyle)
30
31
 
@@ -32,23 +33,23 @@ const TimelineItem = ({
32
33
 
33
34
  return (
34
35
  <div
35
- {...htmlProps}
36
- className={classnames(timelineItemCss, className)}
36
+ {...htmlProps}
37
+ className={classnames(timelineItemCss, globalProps(props), className)}
37
38
  >
38
39
  <div className="pb_timeline_item_left_block">
39
40
  {date &&
40
41
  <DateStacked
41
- align="center"
42
- date={date}
43
- size="sm"
42
+ align="center"
43
+ date={date}
44
+ size="sm"
44
45
  />
45
46
  }
46
47
  </div>
47
48
  <div className="pb_timeline_item_step">
48
49
  <IconCircle
49
- icon={icon}
50
- size="xs"
51
- variant={iconColor}
50
+ icon={icon}
51
+ size="xs"
52
+ variant={iconColor}
52
53
  />
53
54
  <div className="pb_timeline_item_connector" />
54
55
  </div>
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
+ import { GlobalProps, globalProps } from '../utilities/globalProps'
5
6
 
6
7
  import TimelineItem from './_item'
7
8
 
@@ -14,7 +15,7 @@ type TimelineProps = {
14
15
  id?: string,
15
16
  orientation?: string,
16
17
  showDate?: boolean,
17
- }
18
+ } & GlobalProps
18
19
 
19
20
  const Timeline = ({
20
21
  aria = {},
@@ -25,6 +26,7 @@ const Timeline = ({
25
26
  id,
26
27
  orientation = 'horizontal',
27
28
  showDate = false,
29
+ ...props
28
30
  }: TimelineProps) => {
29
31
  const ariaProps = buildAriaProps(aria)
30
32
  const dataProps = buildDataProps(data)
@@ -33,11 +35,11 @@ const Timeline = ({
33
35
  const timelineCss = buildCss('pb_timeline_kit', `_${orientation}`, dateStyle)
34
36
  return (
35
37
  <div
36
- {...ariaProps}
37
- {...dataProps}
38
- {...htmlProps}
39
- className={classnames(timelineCss, className)}
40
- id={id}
38
+ {...ariaProps}
39
+ {...dataProps}
40
+ {...htmlProps}
41
+ className={classnames(timelineCss, globalProps(props), className)}
42
+ id={id}
41
43
  >
42
44
  {children}
43
45
  </div>
@@ -66,6 +66,7 @@ import * as MultipleUsers from 'pb_multiple_users/docs'
66
66
  import * as MultipleUsersStacked from 'pb_multiple_users_stacked/docs'
67
67
  import * as Nav from 'pb_nav/docs'
68
68
  import * as OnlineStatus from 'pb_online_status/docs'
69
+ import * as Overlay from 'pb_overlay/docs'
69
70
  import * as Passphrase from 'pb_passphrase/docs'
70
71
  import * as PbReactPopover from 'pb_popover/docs'
71
72
  import * as Person from 'pb_person/docs'
@@ -170,6 +171,7 @@ WebpackerReact.registerComponents({
170
171
  ...MultipleUsersStacked,
171
172
  ...Nav,
172
173
  ...OnlineStatus,
174
+ ...Overlay,
173
175
  ...Passphrase,
174
176
  ...PbReactPopover,
175
177
  ...Person,
@@ -520,6 +520,7 @@ export const domSafeProps = (props: {[key: string]: string}): {[key: string]: st
520
520
  'paddingY',
521
521
  'padding',
522
522
  'dark',
523
+ 'enableDrag',
523
524
  ]
524
525
  return omit(props, notSafeProps)
525
526
  }
data/dist/menu.yml CHANGED
@@ -352,6 +352,9 @@ kits:
352
352
  platforms: *web
353
353
  description:
354
354
  status: "stable"
355
+ - name: "overlay"
356
+ platforms: *web
357
+ status: "stable"
355
358
  - name: "draggable"
356
359
  platforms: *react_only
357
360
  description:
@@ -467,4 +470,5 @@ kits:
467
470
  status: "stable"
468
471
  - name: "user"
469
472
  platforms: *web
470
- description: This kit was created for having a systematic way of displaying users with avatar, titles, name and territory. This is a versatile kit with features than can be added to display more info.
473
+ description: This kit was created for having a systematic way of displaying users with avatar, titles, name and territory. This is a versatile kit with features than can be added to display more info.
474
+ status: "stable"