playbook_ui 14.9.0.pre.rc.16 → 14.9.0.pre.rc.17
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/pb_progress_simple/_progress_simple.tsx +5 -3
- data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +3 -2
- data/app/pb_kits/playbook/pb_progress_simple/progress_simple.rb +5 -0
- data/app/pb_kits/playbook/utilities/_max_width.scss +25 -9
- data/app/pb_kits/playbook/utilities/_min_width.scss +5 -1
- data/app/pb_kits/playbook/utilities/_width.scss +45 -0
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +13 -4
- data/dist/chunks/{_typeahead-Dmun8ckv.js → _typeahead-B8fkIeXA.js} +1 -1
- data/dist/chunks/{_weekday_stacked-Bpkyzced.js → _weekday_stacked-4d5sISq_.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/classnames.rb +1 -0
- data/lib/playbook/spacing.rb +21 -0
- data/lib/playbook/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d00eca4bbfbc0c7635601ac8ea5bc581b72dc830ef1341b878a85bd7ed1e71fc
|
4
|
+
data.tar.gz: cfcdad0ccad5a5cc1d02625b5ac13fdbd3abd48ac162b6821968c65f70e93d1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f19a2d498ee2652e7e20956b8ce047e638135ad3b9274dc19edeabf82b04ed4de1110c003b48bdda87773f44d9f3e09cf4413678ddce5073fcab4ba220a4ac2a
|
7
|
+
data.tar.gz: aff5d022e2cfd855ecace5ea28927f9c1183c6f25231ce65a6266893fa3a616f6483dbe68270ff8c89cf7f3482ba9586a68b804c50b461406855bc5217d37ddc
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import classnames from 'classnames'
|
3
3
|
import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
4
|
-
import { globalProps } from '../utilities/globalProps'
|
4
|
+
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
5
|
+
|
6
|
+
type ModifiedGlobalProps = Omit<GlobalProps, 'width'>
|
5
7
|
|
6
8
|
type ProgressSimpleProps = {
|
7
9
|
align?: "left" | "center" | "right",
|
@@ -16,7 +18,7 @@ type ProgressSimpleProps = {
|
|
16
18
|
value: number,
|
17
19
|
variant?: "default" | "positive" | "negative" | "warning",
|
18
20
|
width: string,
|
19
|
-
}
|
21
|
+
} & ModifiedGlobalProps
|
20
22
|
|
21
23
|
const ProgressSimple = (props: ProgressSimpleProps): React.ReactElement => {
|
22
24
|
const {
|
@@ -56,7 +58,7 @@ const ProgressSimple = (props: ProgressSimpleProps): React.ReactElement => {
|
|
56
58
|
)
|
57
59
|
|
58
60
|
return (
|
59
|
-
<div
|
61
|
+
<div
|
60
62
|
{...dataProps}
|
61
63
|
{...htmlProps}
|
62
64
|
className={wrapperClass}
|
@@ -1,9 +1,10 @@
|
|
1
|
-
<%= content_tag(:div,
|
1
|
+
<%= content_tag(:div,
|
2
|
+
class: object.wrapper_classname,
|
3
|
+
style: object.style) do %>
|
2
4
|
<%= content_tag(:div,
|
3
5
|
id: object.id,
|
4
6
|
data: object.data_values,
|
5
7
|
class: object.classname,
|
6
|
-
style: object.style,
|
7
8
|
**combined_html_options) do %>
|
8
9
|
<%= content_tag(:div, "",
|
9
10
|
class: "progress_simple_value",
|
@@ -21,6 +21,11 @@ module Playbook
|
|
21
21
|
values: %w[default positive negative warning],
|
22
22
|
default: "default"
|
23
23
|
|
24
|
+
# Explicitly defining the width prop here so the local prop takes precedence over global width prop
|
25
|
+
def width
|
26
|
+
prop(:width)
|
27
|
+
end
|
28
|
+
|
24
29
|
def number_value
|
25
30
|
validate_required_progress_props
|
26
31
|
|
@@ -1,31 +1,47 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
}
|
1
|
+
@import "../tokens/container";
|
2
|
+
|
4
3
|
.max_width_0 {
|
5
|
-
max-width:
|
4
|
+
max-width: map-get($containers, 'none');
|
6
5
|
}
|
6
|
+
|
7
7
|
.max_width_none {
|
8
8
|
max-width: none;
|
9
9
|
}
|
10
10
|
|
11
|
+
.max_width_0_percent {
|
12
|
+
max-width: $container_0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.max_width_xxs {
|
16
|
+
max-width: $container_xxs;
|
17
|
+
}
|
18
|
+
|
19
|
+
.max_width_xs {
|
20
|
+
max-width: $container_xs;
|
21
|
+
}
|
22
|
+
|
11
23
|
.max_width_sm {
|
12
|
-
max-width:
|
24
|
+
max-width: $container_sm;
|
13
25
|
}
|
14
26
|
|
15
27
|
.max_width_md {
|
16
|
-
max-width:
|
28
|
+
max-width: $container_md;
|
17
29
|
}
|
18
30
|
|
19
31
|
.max_width_lg {
|
20
|
-
max-width:
|
32
|
+
max-width: $container_lg;
|
21
33
|
}
|
22
34
|
|
23
35
|
.max_width_xl {
|
24
|
-
max-width:
|
36
|
+
max-width: $container_xl;
|
25
37
|
}
|
26
38
|
|
27
39
|
.max_width_xxl {
|
28
|
-
max-width:
|
40
|
+
max-width: $container_xxl;
|
41
|
+
}
|
42
|
+
|
43
|
+
.max_width_100_percent {
|
44
|
+
max-width: $container_100;
|
29
45
|
}
|
30
46
|
|
31
47
|
.width-resize {
|
@@ -0,0 +1,45 @@
|
|
1
|
+
@import "../tokens/container";
|
2
|
+
|
3
|
+
.width_none {
|
4
|
+
width: none;
|
5
|
+
}
|
6
|
+
|
7
|
+
.width_0 {
|
8
|
+
width: map-get($containers, 'none');
|
9
|
+
}
|
10
|
+
|
11
|
+
.width_0_percent {
|
12
|
+
width: map-get($containers, 'none');
|
13
|
+
}
|
14
|
+
|
15
|
+
.width_xxs {
|
16
|
+
width: $container_xxs;
|
17
|
+
}
|
18
|
+
|
19
|
+
.width_xs {
|
20
|
+
width: $container_xs;
|
21
|
+
}
|
22
|
+
|
23
|
+
.width_sm {
|
24
|
+
width: $container_sm;
|
25
|
+
}
|
26
|
+
|
27
|
+
.width_md {
|
28
|
+
width: $container_md;
|
29
|
+
}
|
30
|
+
|
31
|
+
.width_lg {
|
32
|
+
width: $container_lg;
|
33
|
+
}
|
34
|
+
|
35
|
+
.width_xl {
|
36
|
+
width: $container_xl;
|
37
|
+
}
|
38
|
+
|
39
|
+
.width_xxl {
|
40
|
+
width: $container_xxl;
|
41
|
+
}
|
42
|
+
|
43
|
+
.width_100_percent {
|
44
|
+
width: $container_100;
|
45
|
+
}
|
@@ -95,12 +95,16 @@ type Margin = {
|
|
95
95
|
default?: string
|
96
96
|
}
|
97
97
|
|
98
|
+
type Width = {
|
99
|
+
width?: string
|
100
|
+
}
|
101
|
+
|
98
102
|
type MaxWidth = {
|
99
|
-
maxWidth?:
|
103
|
+
maxWidth?: string,
|
100
104
|
}
|
101
105
|
|
102
106
|
type MinWidth = {
|
103
|
-
minWidth?:
|
107
|
+
minWidth?: string,
|
104
108
|
}
|
105
109
|
|
106
110
|
type NumberSpacing = {
|
@@ -176,7 +180,7 @@ type ZIndex = {
|
|
176
180
|
} | ZIndexResponsiveType
|
177
181
|
|
178
182
|
type Height = {
|
179
|
-
height?: string
|
183
|
+
height?: string
|
180
184
|
}
|
181
185
|
|
182
186
|
type MaxHeight = {
|
@@ -191,7 +195,7 @@ type MinHeight = {
|
|
191
195
|
export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
192
196
|
BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
|
193
197
|
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
194
|
-
LineHeight & Margin & MinWidth & MaxWidth & NumberSpacing & Order & Overflow & Padding &
|
198
|
+
LineHeight & Margin & Width & MinWidth & MaxWidth & NumberSpacing & Order & Overflow & Padding &
|
195
199
|
Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left & Height & MaxHeight & MinHeight;
|
196
200
|
|
197
201
|
const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
|
@@ -351,6 +355,11 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
351
355
|
css += numberSpacing ? `ns_${numberSpacing} ` : ''
|
352
356
|
return css
|
353
357
|
},
|
358
|
+
widthProps: ({ width }: Width) => {
|
359
|
+
let css = ''
|
360
|
+
css += width ? `width_${filterClassName(width)} ` : ''
|
361
|
+
return css.trimEnd()
|
362
|
+
},
|
354
363
|
minWidthProps: ({ minWidth }: MinWidth) => {
|
355
364
|
let css = ''
|
356
365
|
css += minWidth ? `min_width_${filterClassName(minWidth)} ` : ''
|