playbook_ui 12.30.1.pre.alpha.hovertesting914 → 12.30.1.pre.alpha.play846responsivespacingglobalpropsneedsdefault924
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 -2
- data/app/pb_kits/playbook/pb_button/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_button/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_card/_card.scss +3 -0
- data/app/pb_kits/playbook/pb_card/_card.tsx +5 -6
- data/app/pb_kits/playbook/pb_card/card.html.erb +1 -3
- data/app/pb_kits/playbook/pb_card/card.rb +0 -96
- data/app/pb_kits/playbook/pb_card/card_body.rb +93 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.scss +11 -0
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +1 -3
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +1 -3
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +1 -3
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/_dialog.scss +12 -0
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +2 -2
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +1 -4
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +1 -2
- data/app/pb_kits/playbook/pb_message/docs/_message_default.jsx +45 -33
- data/app/pb_kits/playbook/pb_message/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_message/docs/index.js +0 -2
- data/app/pb_kits/playbook/utilities/_colors.scss +0 -3
- data/app/pb_kits/playbook/utilities/globalProps.ts +2 -22
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/version.rb +1 -1
- metadata +2 -8
- data/app/pb_kits/playbook/pb_button/docs/_button_hover.jsx +0 -130
- data/app/pb_kits/playbook/pb_message/docs/_message_hover.jsx +0 -41
- data/app/pb_kits/playbook/tokens/_scale.scss +0 -9
- data/app/pb_kits/playbook/tokens/exports/_scale.scss +0 -13
- data/app/pb_kits/playbook/utilities/_border_radius.scss +0 -31
- data/app/pb_kits/playbook/utilities/_hover.scss +0 -47
@@ -60,11 +60,6 @@ type FlexWrap = {
|
|
60
60
|
flexWrap?: "wrap" | "nowrap" | "wrapReverse"
|
61
61
|
}
|
62
62
|
|
63
|
-
type Hover = Shadow & {
|
64
|
-
background?: string,
|
65
|
-
scale?: "sm" | "md" | "lg"
|
66
|
-
}
|
67
|
-
|
68
63
|
type JustifyContent = {
|
69
64
|
justifyContent?: Alignment & Space
|
70
65
|
}
|
@@ -130,7 +125,7 @@ export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
|
130
125
|
BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
|
131
126
|
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
132
127
|
LineHeight & Margin & MaxWidth & NumberSpacing & Order & Padding &
|
133
|
-
Position & Shadow & ZIndex
|
128
|
+
Position & Shadow & ZIndex
|
134
129
|
|
135
130
|
const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
|
136
131
|
const keys: string[] = Object.keys(prop)
|
@@ -142,16 +137,6 @@ const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: st
|
|
142
137
|
|
143
138
|
// Prop categories
|
144
139
|
const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} = {
|
145
|
-
|
146
|
-
hoverProps: ({ hover }: { hover?: Hover }) => {
|
147
|
-
let css = '';
|
148
|
-
if (!hover) return css;
|
149
|
-
css += hover.shadow ? `hover_shadow_${hover.shadow} ` : '';
|
150
|
-
css += hover.background ? `bg-hover-${hover.background } ` : '';
|
151
|
-
css += hover.scale ? `hover_scale_${hover.scale} ` : '';
|
152
|
-
return css;
|
153
|
-
},
|
154
|
-
|
155
140
|
spacingProps: ({
|
156
141
|
marginRight,
|
157
142
|
marginLeft,
|
@@ -229,11 +214,7 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
229
214
|
});
|
230
215
|
return css.trim();
|
231
216
|
},
|
232
|
-
|
233
|
-
let css = ''
|
234
|
-
css += borderRadius ? `border_radius_${borderRadius} ` : ''
|
235
|
-
return css
|
236
|
-
},
|
217
|
+
|
237
218
|
darkProps: ({ dark }: Dark) => dark ? 'dark' : '',
|
238
219
|
numberSpacingProps: ({ numberSpacing }: NumberSpacing) => {
|
239
220
|
let css = ''
|
@@ -388,7 +369,6 @@ export const globalProps = (props: GlobalProps, defaultProps: DefaultProps = {})
|
|
388
369
|
}).filter((value) => value?.length > 0).join(" ")
|
389
370
|
}
|
390
371
|
|
391
|
-
|
392
372
|
export const deprecatedProps = (kit: string, props: string[] = []): void => {
|
393
373
|
if (process.env.NODE_ENV === 'development') {
|
394
374
|
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
|