playbook_ui 13.29.0.pre.alpha.testingcollapsibleissue3052 → 13.30.0.pre.alpha.PLAY1328fixtimelinekitglobalpropsreact3096
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +1 -0
- data/app/pb_kits/playbook/index.js +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +58 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +68 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_card/_card.scss +5 -0
- data/app/pb_kits/playbook/pb_card/_card.tsx +56 -9
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +9 -5
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +2 -3
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +8 -7
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +13 -32
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +3 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +5 -5
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +5 -5
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +1 -3
- data/app/pb_kits/playbook/pb_overlay/_overlay.scss +72 -0
- data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +78 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx +40 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +7 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx +36 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md +5 -0
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +66 -0
- data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_percentage.tsx +57 -0
- data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +48 -0
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +43 -25
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.html.erb +32 -33
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +0 -2
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +11 -10
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +8 -6
- data/app/pb_kits/playbook/playbook-doc.js +2 -0
- data/dist/menu.yml +5 -1
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/kit_base.rb +19 -0
- data/lib/playbook/version.rb +2 -2
- metadata +17 -2
@@ -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
|
-
|
36
|
-
|
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
|
-
|
42
|
-
|
43
|
-
|
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
|
-
|
50
|
-
|
51
|
-
|
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
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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,
|
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: *react_only
|
357
|
+
status: "beta"
|
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"
|