playbook_ui 14.10.0.pre.alpha.play1662cssbargraph5214 → 14.10.0.pre.alpha.play16825206
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/utilities/_gap.scss +29 -0
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +18 -9
- data/dist/chunks/{_typeahead-gJLWiR0r.js → _typeahead-CbKUtXZa.js} +1 -1
- data/dist/chunks/{_weekday_stacked-7XLAG_Yz.js → _weekday_stacked-CEpLoHbM.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 -4
- data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c3686695d192a5f6435b3e5b6e8fd120a4b5910c068d87cd5308eb0af9e38a0
|
4
|
+
data.tar.gz: da63348971a44ce424f553d0b5220bc10276d9110b9d7f26f59d3a8e0d446a78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a48fa614326e140e32a7a1352a160de4946f2ec72a992558519613ac2e6032fbbf015109fae16cba5f16121494c9d69bd709bc646f2a8df448c4d5364f255d1
|
7
|
+
data.tar.gz: 19a0afe7eef42092273a30082159872df0cd9e51304b2e5bee2df47d8f16c6d66c3fae0df0862256502ecd4e860f6f984659e282ef39623976a06942aa004ba4
|
@@ -0,0 +1,29 @@
|
|
1
|
+
@import "spacing";
|
2
|
+
|
3
|
+
.gap_none {
|
4
|
+
gap: 0;
|
5
|
+
}
|
6
|
+
|
7
|
+
.gap_xxs {
|
8
|
+
gap: $space_xxs;
|
9
|
+
}
|
10
|
+
|
11
|
+
.gap_xs {
|
12
|
+
gap: $space_xs;
|
13
|
+
}
|
14
|
+
|
15
|
+
.gap_sm {
|
16
|
+
gap: $space_sm;
|
17
|
+
}
|
18
|
+
|
19
|
+
.gap_md {
|
20
|
+
gap: $space_md;
|
21
|
+
}
|
22
|
+
|
23
|
+
.gap_lg {
|
24
|
+
gap: $space_lg;
|
25
|
+
}
|
26
|
+
|
27
|
+
.gap_xl {
|
28
|
+
gap: $space_xl;
|
29
|
+
}
|
@@ -108,6 +108,10 @@ type MinWidth = {
|
|
108
108
|
minWidth?: string,
|
109
109
|
}
|
110
110
|
|
111
|
+
type Gap = {
|
112
|
+
gap?: string,
|
113
|
+
}
|
114
|
+
|
111
115
|
type NumberSpacing = {
|
112
116
|
numberSpacing?: "tabular",
|
113
117
|
}
|
@@ -196,7 +200,7 @@ type MinHeight = {
|
|
196
200
|
export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
197
201
|
BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
|
198
202
|
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
199
|
-
LineHeight & Margin & Width & MinWidth & MaxWidth & NumberSpacing & Order & Overflow & Padding &
|
203
|
+
LineHeight & Margin & Width & MinWidth & MaxWidth & Gap & NumberSpacing & Order & Overflow & Padding &
|
200
204
|
Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left & Height & MaxHeight & MinHeight;
|
201
205
|
|
202
206
|
const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
|
@@ -372,6 +376,11 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
372
376
|
css += maxWidth ? `max_width_${filterClassName(maxWidth)} ` : ''
|
373
377
|
return css.trimEnd()
|
374
378
|
},
|
379
|
+
gapProps: ({ gap }: Gap) => {
|
380
|
+
let css = ''
|
381
|
+
css += gap ? `gap_${gap} ` : ''
|
382
|
+
return css.trimEnd()
|
383
|
+
},
|
375
384
|
minHeightProps: ({ minHeight }: MinHeight) => {
|
376
385
|
const heightValues = ["auto", "xs", "sm", "md", "lg", "xl", "xxl", "xxxl"]
|
377
386
|
if (heightValues.includes(minHeight)) {
|
@@ -530,15 +539,15 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
530
539
|
},
|
531
540
|
|
532
541
|
|
533
|
-
topProps: ({top}) => getPositioningPropsClasses('top', top),
|
542
|
+
topProps: ({top}) => getPositioningPropsClasses('top', top),
|
543
|
+
|
544
|
+
rightProps: ({right}) => getPositioningPropsClasses('right', right),
|
534
545
|
|
535
|
-
|
546
|
+
bottomProps:({bottom}) => getPositioningPropsClasses('bottom', bottom),
|
536
547
|
|
537
|
-
bottomProps:({bottom}) => getPositioningPropsClasses('bottom', bottom),
|
538
|
-
|
539
548
|
leftProps: ({left}) => getPositioningPropsClasses('left', left),
|
540
|
-
|
541
|
-
|
549
|
+
|
550
|
+
|
542
551
|
textAlignProps: ({ textAlign }: TextAlign) => {
|
543
552
|
if (typeof textAlign === 'object') {
|
544
553
|
return getResponsivePropClasses(textAlign, 'text_align')
|
@@ -558,7 +567,7 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
558
567
|
|
559
568
|
const PROP_INLINE_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => {[key: string]: any}} = {
|
560
569
|
heightProps: ({ height }: Height) => {
|
561
|
-
return height ? { height } : {};
|
570
|
+
return height ? { height } : {};
|
562
571
|
},
|
563
572
|
|
564
573
|
maxHeightProps: ({ maxHeight }: MaxHeight) => {
|
@@ -566,7 +575,7 @@ const PROP_INLINE_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => {[
|
|
566
575
|
},
|
567
576
|
|
568
577
|
minHeightProps: ({ minHeight }: MinHeight) => {
|
569
|
-
return minHeight ? { minHeight } : {};
|
578
|
+
return minHeight ? { minHeight } : {};
|
570
579
|
},
|
571
580
|
}
|
572
581
|
|