playbook_ui 10.23.0.pre.alpha2 → 10.23.0.pre.cachetest
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 +0 -1
- data/app/pb_kits/playbook/index.js +3 -0
- data/app/pb_kits/playbook/pb_avatar/{_avatar.tsx → _avatar.jsx} +14 -13
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -2
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +1 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +1 -1
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.jsx +1 -1
- data/app/pb_kits/playbook/pb_background/_background.jsx +3 -8
- data/app/pb_kits/playbook/pb_background/_background.scss +8 -24
- data/app/pb_kits/playbook/pb_background/background.rb +6 -6
- data/app/pb_kits/playbook/pb_background/docs/_background_image.html.erb +2 -50
- data/app/pb_kits/playbook/pb_background/docs/_background_image.jsx +28 -71
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +1 -5
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/_button.jsx +4 -8
- data/app/pb_kits/playbook/pb_button/_button.scss +1 -18
- data/app/pb_kits/playbook/pb_button/button.rb +3 -13
- data/app/pb_kits/playbook/pb_button/button.test.js +0 -13
- data/app/pb_kits/playbook/pb_button/docs/_button_accessibility.html.erb +1 -1
- data/app/pb_kits/playbook/pb_button/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_button/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +1 -1
- data/app/pb_kits/playbook/pb_caption/_caption.jsx +1 -1
- data/app/pb_kits/playbook/pb_card/_card.jsx +1 -1
- data/app/pb_kits/playbook/pb_card/card.html.erb +1 -1
- data/app/pb_kits/playbook/pb_card/card.rb +0 -88
- data/app/pb_kits/playbook/pb_card/card_body.rb +1 -1
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +0 -3
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +0 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.jsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.jsx +1 -1
- data/app/pb_kits/playbook/pb_currency/_currency.jsx +3 -24
- data/app/pb_kits/playbook/pb_currency/currency.rb +3 -12
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_currency/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/_dialog.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.jsx +1 -1
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +1 -1
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +10 -17
- data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_align.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +24 -2
- data/app/pb_kits/playbook/pb_form_group/_form_group.jsx +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +0 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +2 -2
- data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +0 -3
- data/app/pb_kits/playbook/pb_gauge/gauge.rb +0 -1
- data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon/icon.rb +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.jsx +1 -1
- data/app/pb_kits/playbook/pb_image/{_image.tsx → _image.jsx} +15 -11
- data/app/pb_kits/playbook/pb_image/_image.scss +3 -3
- data/app/pb_kits/playbook/pb_image/docs/{_default_image.tsx → _default_image.jsx} +1 -1
- data/app/pb_kits/playbook/pb_image/docs/index.js +4 -4
- data/app/pb_kits/playbook/pb_image/image.rb +1 -1
- data/app/pb_kits/playbook/pb_image/image.test.js +1 -1
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.jsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +1 -5
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -1
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +0 -1
- data/app/pb_kits/playbook/pb_list/_list.jsx +1 -1
- data/app/pb_kits/playbook/pb_list/_list_item.jsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +1 -1
- data/app/pb_kits/playbook/pb_online_status/{_online_status.tsx → _online_status.jsx} +6 -4
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.jsx +1 -2
- data/app/pb_kits/playbook/pb_pill/_pill.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/_popover.jsx +5 -3
- data/app/pb_kits/playbook/pb_popover/docs/_popover_close.html.erb +7 -7
- data/app/pb_kits/playbook/pb_popover/index.js +9 -4
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +1 -1
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +1 -1
- data/app/pb_kits/playbook/pb_radio/_radio.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +93 -83
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.jsx +8 -15
- data/app/pb_kits/playbook/pb_table/_table.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/_table_row.jsx +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +0 -14
- data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +0 -1
- data/app/pb_kits/playbook/pb_time/_time.jsx +1 -1
- data/app/pb_kits/playbook/pb_title/_title.jsx +1 -1
- data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +1 -1
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.jsx +1 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx +1 -1
- data/app/pb_kits/playbook/plugins/pb_chart.js +4 -8
- data/app/pb_kits/playbook/types.js +4 -0
- data/app/pb_kits/playbook/utilities/globalProps.js +97 -0
- data/app/pb_kits/playbook/utilities/{props.ts → props.js} +7 -9
- data/lib/playbook/classnames.rb +0 -11
- data/lib/playbook/kit_base.rb +0 -22
- data/lib/playbook/version.rb +2 -2
- metadata +9 -42
- data/app/pb_kits/playbook/pb_background/docs/_background_image.md +0 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_form.html.erb +0 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_form.jsx +0 -14
- data/app/pb_kits/playbook/pb_button/docs/_button_size.html.erb +0 -3
- data/app/pb_kits/playbook/pb_button/docs/_button_size.jsx +0 -26
- data/app/pb_kits/playbook/pb_button/docs/_button_size.md +0 -1
- data/app/pb_kits/playbook/pb_currency/currency.test.js +0 -35
- data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.html.erb +0 -27
- data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.jsx +0 -44
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.js +0 -215
- data/app/pb_kits/playbook/pb_file_upload/fileupload.test.js +0 -40
- data/app/pb_kits/playbook/utilities/_align_content.scss +0 -29
- data/app/pb_kits/playbook/utilities/_align_items.scss +0 -35
- data/app/pb_kits/playbook/utilities/_align_self.scss +0 -29
- data/app/pb_kits/playbook/utilities/_flex.scss +0 -15
- data/app/pb_kits/playbook/utilities/_flex_direction.scss +0 -19
- data/app/pb_kits/playbook/utilities/_flex_grow.scss +0 -9
- data/app/pb_kits/playbook/utilities/_flex_shrink.scss +0 -9
- data/app/pb_kits/playbook/utilities/_flex_wrap.scss +0 -14
- data/app/pb_kits/playbook/utilities/_flexbox.scss +0 -11
- data/app/pb_kits/playbook/utilities/_justify_content.scss +0 -23
- data/app/pb_kits/playbook/utilities/_justify_self.scss +0 -19
- data/app/pb_kits/playbook/utilities/_order.scss +0 -55
- data/app/pb_kits/playbook/utilities/globalProps.ts +0 -274
- data/lib/playbook/align_content.rb +0 -29
- data/lib/playbook/align_items.rb +0 -29
- data/lib/playbook/align_self.rb +0 -29
- data/lib/playbook/flex.rb +0 -29
- data/lib/playbook/flex_direction.rb +0 -29
- data/lib/playbook/flex_grow.rb +0 -29
- data/lib/playbook/flex_shrink.rb +0 -29
- data/lib/playbook/flex_wrap.rb +0 -29
- data/lib/playbook/justify_content.rb +0 -29
- data/lib/playbook/justify_self.rb +0 -29
- data/lib/playbook/order.rb +0 -29
@@ -1,29 +0,0 @@
|
|
1
|
-
.align_self_start {
|
2
|
-
display: flex;
|
3
|
-
align-self: start !important;
|
4
|
-
}
|
5
|
-
|
6
|
-
.align_self_end {
|
7
|
-
display: flex;
|
8
|
-
align-self: end !important;
|
9
|
-
}
|
10
|
-
|
11
|
-
.align_self_auto {
|
12
|
-
display: flex;
|
13
|
-
align-self: auto !important;
|
14
|
-
}
|
15
|
-
|
16
|
-
.align_self_center {
|
17
|
-
display: flex;
|
18
|
-
align-self: center !important;
|
19
|
-
}
|
20
|
-
|
21
|
-
.align_self_stretch {
|
22
|
-
display: flex;
|
23
|
-
align-self: stretch !important;
|
24
|
-
}
|
25
|
-
|
26
|
-
.align_self_baseline {
|
27
|
-
display: flex;
|
28
|
-
align-self: baseline !important;
|
29
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
.flex_direction_row {
|
2
|
-
display: flex;
|
3
|
-
flex-direction: row !important;
|
4
|
-
}
|
5
|
-
|
6
|
-
.flex_direction_column {
|
7
|
-
display: flex;
|
8
|
-
flex-direction: column !important;
|
9
|
-
}
|
10
|
-
|
11
|
-
.flex_direction_row_reverse {
|
12
|
-
display: flex;
|
13
|
-
flex-direction: row-reverse !important;
|
14
|
-
}
|
15
|
-
|
16
|
-
.flex_direction_column_reverse {
|
17
|
-
display: flex;
|
18
|
-
flex-direction: column-reverse !important;
|
19
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
@import './utilities/flex_direction';
|
2
|
-
@import './utilities/justify_content';
|
3
|
-
@import './utilities/flex_wrap';
|
4
|
-
@import './utilities/justify_self';
|
5
|
-
@import './utilities/align_items';
|
6
|
-
@import './utilities/align_content';
|
7
|
-
@import './utilities/align_self';
|
8
|
-
@import './utilities/flex';
|
9
|
-
@import './utilities/flex_grow';
|
10
|
-
@import './utilities/flex_shrink';
|
11
|
-
@import './utilities/order';
|
@@ -1,23 +0,0 @@
|
|
1
|
-
.justify_content_start {
|
2
|
-
justify-content: start !important;
|
3
|
-
}
|
4
|
-
|
5
|
-
.justify_content_end {
|
6
|
-
justify-content: end !important;
|
7
|
-
}
|
8
|
-
|
9
|
-
.justify_content_center {
|
10
|
-
justify-content: center !important;
|
11
|
-
}
|
12
|
-
|
13
|
-
.justify_content_space_between {
|
14
|
-
justify-content: space-between !important;
|
15
|
-
}
|
16
|
-
|
17
|
-
.justify_content_space_around {
|
18
|
-
justify-content: space-around !important;
|
19
|
-
}
|
20
|
-
|
21
|
-
.justify_content_space_evenly {
|
22
|
-
justify-content: space-evenly !important;
|
23
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
.justify_self_auto {
|
2
|
-
justify-self: auto !important;
|
3
|
-
}
|
4
|
-
|
5
|
-
.justify_self_start {
|
6
|
-
justify-self: start !important;
|
7
|
-
}
|
8
|
-
|
9
|
-
.justify_self_end {
|
10
|
-
justify-self: end !important;
|
11
|
-
}
|
12
|
-
|
13
|
-
.justify_self_center {
|
14
|
-
justify-self: center !important;
|
15
|
-
}
|
16
|
-
|
17
|
-
.justify_self_stretch {
|
18
|
-
justify-self: stretch !important;
|
19
|
-
}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
.order_1 {
|
2
|
-
order: 1 !important;
|
3
|
-
}
|
4
|
-
|
5
|
-
.order_2 {
|
6
|
-
order: 2 !important;
|
7
|
-
}
|
8
|
-
|
9
|
-
.order_3 {
|
10
|
-
order: 3 !important;
|
11
|
-
}
|
12
|
-
|
13
|
-
.order_4 {
|
14
|
-
order: 4 !important;
|
15
|
-
}
|
16
|
-
|
17
|
-
.order_5 {
|
18
|
-
order: 5 !important;
|
19
|
-
}
|
20
|
-
|
21
|
-
.order_6 {
|
22
|
-
order: 6 !important;
|
23
|
-
}
|
24
|
-
|
25
|
-
.order_7 {
|
26
|
-
order: 7 !important;
|
27
|
-
}
|
28
|
-
|
29
|
-
.order_8 {
|
30
|
-
order: 8 !important;
|
31
|
-
}
|
32
|
-
|
33
|
-
.order_9 {
|
34
|
-
order: 9 !important;
|
35
|
-
}
|
36
|
-
|
37
|
-
.order_10 {
|
38
|
-
order: 10 !important;
|
39
|
-
}
|
40
|
-
|
41
|
-
.order_11 {
|
42
|
-
order: 11 !important;
|
43
|
-
}
|
44
|
-
|
45
|
-
.order_12 {
|
46
|
-
order: 12 !important;
|
47
|
-
}
|
48
|
-
|
49
|
-
.order_none {
|
50
|
-
order: none !important;
|
51
|
-
}
|
52
|
-
|
53
|
-
.order_first {
|
54
|
-
order: -1 !important;
|
55
|
-
}
|
@@ -1,274 +0,0 @@
|
|
1
|
-
type Sizes = "xs" | "sm" | "md" | "lg" | "xl"
|
2
|
-
type None = "none"
|
3
|
-
|
4
|
-
type AllSizes = None & Sizes
|
5
|
-
|
6
|
-
type Margin = {
|
7
|
-
marginRight?: AllSizes,
|
8
|
-
marginLeft?: AllSizes,
|
9
|
-
marginTop?: AllSizes,
|
10
|
-
marginBottom?: AllSizes,
|
11
|
-
marginX?: AllSizes,
|
12
|
-
marginY?: AllSizes,
|
13
|
-
margin?: AllSizes,
|
14
|
-
}
|
15
|
-
|
16
|
-
type Padding = {
|
17
|
-
paddingRight?: AllSizes,
|
18
|
-
paddingLeft?: AllSizes,
|
19
|
-
paddingTop?: AllSizes,
|
20
|
-
paddingBottom?: AllSizes,
|
21
|
-
paddingX?: AllSizes,
|
22
|
-
paddingY?: AllSizes,
|
23
|
-
padding?: AllSizes,
|
24
|
-
}
|
25
|
-
|
26
|
-
type Dark = {
|
27
|
-
dark?: boolean,
|
28
|
-
}
|
29
|
-
|
30
|
-
type NumberSpacing = {
|
31
|
-
numberSpacing?: "tabular",
|
32
|
-
}
|
33
|
-
|
34
|
-
type MaxWidth = {
|
35
|
-
maxWidth?: Sizes,
|
36
|
-
}
|
37
|
-
|
38
|
-
type ZIndex = {
|
39
|
-
zIndex?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10,
|
40
|
-
}
|
41
|
-
|
42
|
-
type Shadow = {
|
43
|
-
shadow?: "none" | "deep" | "deeper" | "deepest",
|
44
|
-
}
|
45
|
-
|
46
|
-
type LineHeight = {
|
47
|
-
lineHeight?: "loosest" | "looser" | "loose" | "normal" | "tight" | "tighter" | "tightest",
|
48
|
-
}
|
49
|
-
|
50
|
-
type Display = {
|
51
|
-
display?: "block" | "flex" | "hidden" | "inline_block" | "inline" | "inline_flex",
|
52
|
-
}
|
53
|
-
|
54
|
-
type Cursor = {
|
55
|
-
cursor?: "pointer",
|
56
|
-
}
|
57
|
-
|
58
|
-
type BorderRadius = {
|
59
|
-
borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "rounded",
|
60
|
-
}
|
61
|
-
|
62
|
-
type Flex = {
|
63
|
-
flex?: "none" | "initial" | "auto" | 1
|
64
|
-
}
|
65
|
-
|
66
|
-
type FlexDirection = {
|
67
|
-
flexDirection?: "row" | "column" | "rowReverse" | "columnReverse"
|
68
|
-
}
|
69
|
-
|
70
|
-
type FlexGrow = {
|
71
|
-
flexGrow?: 0 | 1
|
72
|
-
}
|
73
|
-
|
74
|
-
type FlexShrink = {
|
75
|
-
flexShrink?: 0 | 1
|
76
|
-
}
|
77
|
-
|
78
|
-
type FlexWrap = {
|
79
|
-
flexWrap?: "wrap" | "nowrap" | "wrapReverse"
|
80
|
-
}
|
81
|
-
|
82
|
-
type Alignment = "start" | "end" | "center"
|
83
|
-
|
84
|
-
type Space = "spaceBetween" | "spaceAround" | "spaceEvenly"
|
85
|
-
|
86
|
-
type JustifyContent = {
|
87
|
-
justifyContent?: Alignment & Space
|
88
|
-
}
|
89
|
-
|
90
|
-
type JustifySelf = {
|
91
|
-
justifySelf?: Alignment & ("auto" | "stretch")
|
92
|
-
}
|
93
|
-
|
94
|
-
type AlignContent = {
|
95
|
-
alignContent?: Alignment & Space
|
96
|
-
}
|
97
|
-
|
98
|
-
type AlignItems = {
|
99
|
-
alignItems?: Alignment & ("flexStart" | "flexEnd" | "stretch" | "baseline")
|
100
|
-
}
|
101
|
-
|
102
|
-
type AlignSelf = {
|
103
|
-
alignSelf?: Alignment & ("auto" | "stretch" | "baseline")
|
104
|
-
}
|
105
|
-
|
106
|
-
type Order = {
|
107
|
-
order?: "none" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
|
108
|
-
}
|
109
|
-
|
110
|
-
export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
111
|
-
BorderRadius & Cursor & Dark & Display & Flex & FlexDirection &
|
112
|
-
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
113
|
-
LineHeight & Margin & MaxWidth & NumberSpacing & Order & Padding &
|
114
|
-
Shadow & ZIndex
|
115
|
-
|
116
|
-
// Prop categories
|
117
|
-
const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} = {
|
118
|
-
spacingProps: ({
|
119
|
-
marginRight,
|
120
|
-
marginLeft,
|
121
|
-
marginTop,
|
122
|
-
marginBottom,
|
123
|
-
marginX,
|
124
|
-
marginY,
|
125
|
-
margin,
|
126
|
-
paddingRight,
|
127
|
-
paddingLeft,
|
128
|
-
paddingTop,
|
129
|
-
paddingBottom,
|
130
|
-
paddingX,
|
131
|
-
paddingY,
|
132
|
-
padding,
|
133
|
-
}: Margin & Padding) => {
|
134
|
-
let css = ''
|
135
|
-
css += marginRight ? `mr_${marginRight} ` : ''
|
136
|
-
css += marginLeft ? `ml_${marginLeft} ` : ''
|
137
|
-
css += marginTop ? `mt_${marginTop} ` : ''
|
138
|
-
css += marginBottom ? `mb_${marginBottom} ` : ''
|
139
|
-
css += marginX ? `mx_${marginX} ` : ''
|
140
|
-
css += marginY ? `my_${marginY} ` : ''
|
141
|
-
css += margin ? `m_${margin} ` : ''
|
142
|
-
css += paddingRight ? `pr_${paddingRight} ` : ''
|
143
|
-
css += paddingLeft ? `pl_${paddingLeft} ` : ''
|
144
|
-
css += paddingTop ? `pt_${paddingTop} ` : ''
|
145
|
-
css += paddingBottom ? `pb_${paddingBottom} ` : ''
|
146
|
-
css += paddingX ? `px_${paddingX} ` : ''
|
147
|
-
css += paddingY ? `py_${paddingY} ` : ''
|
148
|
-
css += padding ? `p_${padding} ` : ''
|
149
|
-
return css
|
150
|
-
},
|
151
|
-
darkProps: ({ dark }: Dark) => {
|
152
|
-
let css = ''
|
153
|
-
css += dark ? 'dark' : ''
|
154
|
-
return css
|
155
|
-
},
|
156
|
-
numberSpacingProps: ({ numberSpacing }: NumberSpacing) => {
|
157
|
-
let css = ''
|
158
|
-
css += numberSpacing ? `ns_${numberSpacing} ` : ''
|
159
|
-
return css
|
160
|
-
},
|
161
|
-
maxWidthProps: ({ maxWidth }: MaxWidth) => {
|
162
|
-
let css = ''
|
163
|
-
css += maxWidth ? `max_width_${maxWidth } ` : ''
|
164
|
-
return css
|
165
|
-
},
|
166
|
-
zIndexProps: ({ zIndex }: ZIndex) => {
|
167
|
-
let css = ''
|
168
|
-
css += zIndex ? `z_index_${zIndex } ` : ''
|
169
|
-
return css
|
170
|
-
},
|
171
|
-
shadowProps: ({ shadow }: Shadow) => {
|
172
|
-
let css = ''
|
173
|
-
css += shadow ? `shadow_${shadow} ` : ''
|
174
|
-
return css
|
175
|
-
},
|
176
|
-
lineHeightProps: ({ lineHeight }: LineHeight) => {
|
177
|
-
let css = ''
|
178
|
-
css += lineHeight ? `line_height_${lineHeight} ` : ''
|
179
|
-
return css
|
180
|
-
},
|
181
|
-
displayProps: ({ display }: Display) => {
|
182
|
-
let css = ''
|
183
|
-
css += display ? `display_${display} ` : ''
|
184
|
-
return css
|
185
|
-
},
|
186
|
-
cursorProps: ({ cursor }: Cursor) => {
|
187
|
-
let css = ''
|
188
|
-
css += cursor ? `cursor_${cursor} ` : ''
|
189
|
-
return css
|
190
|
-
},
|
191
|
-
flexDirectionProps: ({ flexDirection }: FlexDirection) => {
|
192
|
-
let css = ''
|
193
|
-
css += flexDirection == 'columnReverse' ? 'flex_direction_column_reverse' :
|
194
|
-
flexDirection == 'rowReverse' ? 'flex_direction_row_reverse' :
|
195
|
-
flexDirection ? `flex_direction_${flexDirection} ` : ''
|
196
|
-
return css
|
197
|
-
},
|
198
|
-
flexWrapProps: ({ flexWrap }: FlexWrap) => {
|
199
|
-
let css = ''
|
200
|
-
css += flexWrap == 'wrapReverse' ? 'flex_wrap_reverse' :
|
201
|
-
flexWrap == 'nowrap' ? 'flex_nowrap' :
|
202
|
-
flexWrap ? `flex_wrap_${flexWrap} ` : ''
|
203
|
-
return css
|
204
|
-
},
|
205
|
-
justifyContentProps: ({ justifyContent }: JustifyContent) => {
|
206
|
-
let css = ''
|
207
|
-
css += justifyContent == 'spaceBetween' ? 'justify_content_space_between' :
|
208
|
-
justifyContent == 'spaceEvenly' ? 'justify_content_space_evenly' :
|
209
|
-
justifyContent == 'spaceAround' ? 'justify_content_space_around' :
|
210
|
-
justifyContent ? `justify_content_${justifyContent}` : ''
|
211
|
-
return css
|
212
|
-
},
|
213
|
-
justifySelfProps: ({ justifySelf }: JustifySelf) => {
|
214
|
-
let css = ''
|
215
|
-
css += justifySelf ? `justify_self_${justifySelf}` : ''
|
216
|
-
return css
|
217
|
-
},
|
218
|
-
alignItemsProps: ({ alignItems }: AlignItems) => {
|
219
|
-
let css = ''
|
220
|
-
css += alignItems == 'flexStart' ? 'align_items_flex_start' :
|
221
|
-
alignItems == 'flexEnd' ? 'align_items_flex_end' :
|
222
|
-
alignItems ? `align_items_${alignItems}` : ''
|
223
|
-
return css
|
224
|
-
},
|
225
|
-
alignContentProps: ({ alignContent }: AlignContent) => {
|
226
|
-
let css = ''
|
227
|
-
css += alignContent == 'spaceBetween' ? 'align_content_space_between' :
|
228
|
-
alignContent == 'spaceEvenly' ? 'align_content_space_evenly' :
|
229
|
-
alignContent == 'spaceAround' ? 'align_content_space_around' :
|
230
|
-
alignContent ? `align_content_${alignContent}` : ''
|
231
|
-
return css
|
232
|
-
},
|
233
|
-
alignSelfProps: ({ alignSelf }: AlignSelf) => {
|
234
|
-
let css = ''
|
235
|
-
css += alignSelf ? `align_self_${alignSelf}` : ''
|
236
|
-
return css
|
237
|
-
},
|
238
|
-
flexProps: ({ flex }: Flex) => {
|
239
|
-
let css = ''
|
240
|
-
css += flex ? `flex_${flex}` : ''
|
241
|
-
return css
|
242
|
-
},
|
243
|
-
flexGrowProps: ({ flexGrow }: FlexGrow) => {
|
244
|
-
let css = ''
|
245
|
-
css += flexGrow ? `flex_grow_${flexGrow}` : ''
|
246
|
-
return css
|
247
|
-
},
|
248
|
-
flexShrinkProps: ({ flexShrink }: FlexShrink) => {
|
249
|
-
let css = ''
|
250
|
-
css += flexShrink ? `flex_shrink_${flexShrink}` : ''
|
251
|
-
return css
|
252
|
-
},
|
253
|
-
orderProps: ({ order }: Order) => {
|
254
|
-
let css = ''
|
255
|
-
css += order ? `order_${order}` : ''
|
256
|
-
return css
|
257
|
-
}
|
258
|
-
}
|
259
|
-
|
260
|
-
export const globalProps = (props: GlobalProps, defaultProps: {[key: string]: string} | {} = {}): string => {
|
261
|
-
const allProps = { ...props, ...defaultProps }
|
262
|
-
return Object.keys(PROP_CATEGORIES).map((key) => {
|
263
|
-
return PROP_CATEGORIES[key](allProps)
|
264
|
-
}).filter((value) => value?.length > 0).join(" ")
|
265
|
-
}
|
266
|
-
|
267
|
-
export const deprecatedProps = (kit: string, props: string[] = []): void => {
|
268
|
-
if (process.env.NODE_ENV === 'development') {
|
269
|
-
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
|
270
|
-
props.forEach((prop) => {
|
271
|
-
console.warn(`${kit} Kit: The prop '${prop}' is deprecated and will be removed in a future release!`)
|
272
|
-
})
|
273
|
-
}
|
274
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module AlignContent
|
5
|
-
def self.included(base)
|
6
|
-
base.prop :align_content
|
7
|
-
end
|
8
|
-
|
9
|
-
def align_content_props
|
10
|
-
selected_props = align_content_options.keys.select { |sk| try(sk) }
|
11
|
-
return nil unless selected_props.present?
|
12
|
-
|
13
|
-
selected_props.map do |k|
|
14
|
-
align_content_value = send(k)
|
15
|
-
"align_content_#{align_content_value}" if align_content_values.include? align_content_value
|
16
|
-
end.compact.join(" ")
|
17
|
-
end
|
18
|
-
|
19
|
-
def align_content_options
|
20
|
-
{
|
21
|
-
align_content: "align_content",
|
22
|
-
}
|
23
|
-
end
|
24
|
-
|
25
|
-
def align_content_values
|
26
|
-
%w[start end center space_between space_around space_evenly]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/lib/playbook/align_items.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module AlignItems
|
5
|
-
def self.included(base)
|
6
|
-
base.prop :align_items
|
7
|
-
end
|
8
|
-
|
9
|
-
def align_items_props
|
10
|
-
selected_props = align_items_options.keys.select { |sk| try(sk) }
|
11
|
-
return nil unless selected_props.present?
|
12
|
-
|
13
|
-
selected_props.map do |k|
|
14
|
-
align_items_value = send(k)
|
15
|
-
"align_items_#{align_items_value}" if align_items_values.include? align_items_value
|
16
|
-
end.compact.join(" ")
|
17
|
-
end
|
18
|
-
|
19
|
-
def align_items_options
|
20
|
-
{
|
21
|
-
align_items: "align_items",
|
22
|
-
}
|
23
|
-
end
|
24
|
-
|
25
|
-
def align_items_values
|
26
|
-
%w[flex_start flex_end start end center baseline stretch]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/lib/playbook/align_self.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module AlignSelf
|
5
|
-
def self.included(base)
|
6
|
-
base.prop :align_self
|
7
|
-
end
|
8
|
-
|
9
|
-
def align_self_props
|
10
|
-
selected_props = align_self_options.keys.select { |sk| try(sk) }
|
11
|
-
return nil unless selected_props.present?
|
12
|
-
|
13
|
-
selected_props.map do |k|
|
14
|
-
align_self_value = send(k)
|
15
|
-
"align_self_#{align_self_value}" if align_self_values.include? align_self_value
|
16
|
-
end.compact.join(" ")
|
17
|
-
end
|
18
|
-
|
19
|
-
def align_self_options
|
20
|
-
{
|
21
|
-
align_self: "align_self",
|
22
|
-
}
|
23
|
-
end
|
24
|
-
|
25
|
-
def align_self_values
|
26
|
-
%w[auto start end center stretch baseline]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/lib/playbook/flex.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module Flex
|
5
|
-
def self.included(base)
|
6
|
-
base.prop :flex
|
7
|
-
end
|
8
|
-
|
9
|
-
def flex_props
|
10
|
-
selected_props = flex_options.keys.select { |sk| try(sk) }
|
11
|
-
return nil unless selected_props.present?
|
12
|
-
|
13
|
-
selected_props.map do |k|
|
14
|
-
flex_value = send(k)
|
15
|
-
"flex_#{flex_value}" if flex_values.include? flex_value
|
16
|
-
end.compact.join(" ")
|
17
|
-
end
|
18
|
-
|
19
|
-
def flex_options
|
20
|
-
{
|
21
|
-
flex: "flex",
|
22
|
-
}
|
23
|
-
end
|
24
|
-
|
25
|
-
def flex_values
|
26
|
-
%w[auto initial 0 1 2 3 4 5 6 7 8 9 10 11 12 none]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module FlexDirection
|
5
|
-
def self.included(base)
|
6
|
-
base.prop :flex_direction
|
7
|
-
end
|
8
|
-
|
9
|
-
def flex_direction_props
|
10
|
-
selected_props = flex_direction_options.keys.select { |sk| try(sk) }
|
11
|
-
return nil unless selected_props.present?
|
12
|
-
|
13
|
-
selected_props.map do |k|
|
14
|
-
flex_direction_value = send(k)
|
15
|
-
"flex_direction_#{flex_direction_value}" if flex_direction_values.include? flex_direction_value
|
16
|
-
end.compact.join(" ")
|
17
|
-
end
|
18
|
-
|
19
|
-
def flex_direction_options
|
20
|
-
{
|
21
|
-
flex_direction: "flex_direction",
|
22
|
-
}
|
23
|
-
end
|
24
|
-
|
25
|
-
def flex_direction_values
|
26
|
-
%w[row column row_reverse column_reverse]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/lib/playbook/flex_grow.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module FlexGrow
|
5
|
-
def self.included(base)
|
6
|
-
base.prop :flex_grow
|
7
|
-
end
|
8
|
-
|
9
|
-
def flex_grow_props
|
10
|
-
selected_props = flex_grow_options.keys.select { |sk| try(sk) }
|
11
|
-
return nil unless selected_props.present?
|
12
|
-
|
13
|
-
selected_props.map do |k|
|
14
|
-
flex_grow_value = send(k)
|
15
|
-
"flex_grow_#{flex_grow_value}" if flex_grow_values.include? flex_grow_value
|
16
|
-
end.compact.join(" ")
|
17
|
-
end
|
18
|
-
|
19
|
-
def flex_grow_options
|
20
|
-
{
|
21
|
-
flex_grow: "flex_grow",
|
22
|
-
}
|
23
|
-
end
|
24
|
-
|
25
|
-
def flex_grow_values
|
26
|
-
%w[1 0]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/lib/playbook/flex_shrink.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module FlexShrink
|
5
|
-
def self.included(base)
|
6
|
-
base.prop :flex_shrink
|
7
|
-
end
|
8
|
-
|
9
|
-
def flex_shrink_props
|
10
|
-
selected_props = flex_shrink_options.keys.select { |sk| try(sk) }
|
11
|
-
return nil unless selected_props.present?
|
12
|
-
|
13
|
-
selected_props.map do |k|
|
14
|
-
flex_shrink_value = send(k)
|
15
|
-
"flex_shrink_#{flex_shrink_value}" if flex_shrink_values.include? flex_shrink_value
|
16
|
-
end.compact.join(" ")
|
17
|
-
end
|
18
|
-
|
19
|
-
def flex_shrink_options
|
20
|
-
{
|
21
|
-
flex_shrink: "flex_shrink",
|
22
|
-
}
|
23
|
-
end
|
24
|
-
|
25
|
-
def flex_shrink_values
|
26
|
-
%w[1 0]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|