playbook_ui 14.6.2.pre.alpha.PLAY1551tiptapextbump4350 → 14.6.2.pre.alpha.PLAY1613darkdatetimecolors4432
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 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +8 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +21 -28
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +37 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx +13 -2
- data/app/pb_kits/playbook/pb_card/_card.tsx +11 -4
- data/app/pb_kits/playbook/pb_date/_date.scss +3 -0
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +5 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +8 -7
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +3 -1
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +8 -2
- data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +3 -6
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +7 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +6 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +30 -26
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +24 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +25 -2
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +3 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +1 -0
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +46 -8
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +37 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.tsx +67 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading_mixins.scss +40 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.jsx +51 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.md +1 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.jsx +26 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.md +1 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.jsx +11 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +59 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.md +3 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.jsx +20 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.md +3 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +13 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +5 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +12 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +8 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.test.jsx +81 -0
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +59 -23
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +8 -0
- data/app/pb_kits/playbook/pb_timeline/detail.html.erb +3 -0
- data/app/pb_kits/playbook/pb_timeline/detail.rb +11 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +43 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +68 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +2 -0
- data/app/pb_kits/playbook/pb_timeline/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_timeline/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +17 -21
- data/app/pb_kits/playbook/pb_timeline/item.rb +4 -0
- data/app/pb_kits/playbook/pb_timeline/label.html.erb +12 -0
- data/app/pb_kits/playbook/pb_timeline/label.rb +13 -0
- data/app/pb_kits/playbook/pb_timeline/step.html.erb +14 -0
- data/app/pb_kits/playbook/pb_timeline/step.rb +16 -0
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx +29 -0
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +38 -0
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx +42 -0
- data/app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx +3 -0
- data/app/pb_kits/playbook/pb_timeline/timeline.test.js +84 -0
- data/app/pb_kits/playbook/utilities/_hover.scss +46 -43
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +4 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +44 -2
- data/dist/chunks/_typeahead-DhLic2Fe.js +22 -0
- data/dist/chunks/_weekday_stacked-Mx8TYP5I.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +4 -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/hover.rb +4 -1
- data/lib/playbook/kit_base.rb +43 -5
- data/lib/playbook/version.rb +1 -1
- metadata +37 -5
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
- data/dist/chunks/_typeahead-BV_n6U5W.js +0 -22
- data/dist/chunks/_weekday_stacked-BLVPFG6h.js +0 -45
@@ -66,6 +66,10 @@ type Hover = Shadow & {
|
|
66
66
|
scale?: "sm" | "md" | "lg"
|
67
67
|
}
|
68
68
|
|
69
|
+
type GroupHover = {
|
70
|
+
groupHover?: boolean,
|
71
|
+
}
|
72
|
+
|
69
73
|
type JustifyContent = {
|
70
74
|
justifyContent?: Alignment & Space
|
71
75
|
}
|
@@ -170,12 +174,24 @@ type ZIndex = {
|
|
170
174
|
zIndex?: ZIndexType,
|
171
175
|
} | ZIndexResponsiveType
|
172
176
|
|
177
|
+
type Height = {
|
178
|
+
height?: string
|
179
|
+
}
|
180
|
+
|
181
|
+
type MaxHeight = {
|
182
|
+
maxHeight?: string
|
183
|
+
}
|
184
|
+
|
185
|
+
type MinHeight = {
|
186
|
+
minHeight?: string
|
187
|
+
}
|
188
|
+
|
173
189
|
// keep this as the last type definition
|
174
190
|
export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
175
191
|
BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
|
176
192
|
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
177
193
|
LineHeight & Margin & MinWidth & MaxWidth & NumberSpacing & Order & Overflow & Padding &
|
178
|
-
Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left;
|
194
|
+
Position & Shadow & TextAlign & Truncate & VerticalAlign & ZIndex & { hover?: string } & Top & Right & Bottom & Left & Height & MaxHeight & MinHeight;
|
179
195
|
|
180
196
|
const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
|
181
197
|
const keys: string[] = Object.keys(prop)
|
@@ -209,6 +225,7 @@ const filterClassName = (value: string): string => {
|
|
209
225
|
// Prop categories
|
210
226
|
const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} = {
|
211
227
|
|
228
|
+
groupHoverProps: ({ groupHover }: GroupHover ) => groupHover ? 'group_hover ' : '',
|
212
229
|
hoverProps: ({ hover }: { hover?: Hover }) => {
|
213
230
|
let css = '';
|
214
231
|
if (!hover) return css;
|
@@ -498,7 +515,22 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
498
515
|
} else {
|
499
516
|
return verticalAlign ? `vertical_align_${verticalAlign} ` : ''
|
500
517
|
}
|
501
|
-
}
|
518
|
+
},
|
519
|
+
|
520
|
+
}
|
521
|
+
|
522
|
+
const PROP_INLINE_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => {[key: string]: any}} = {
|
523
|
+
heightProps: ({ height }: Height) => {
|
524
|
+
return height ? { height } : {};
|
525
|
+
},
|
526
|
+
|
527
|
+
maxHeightProps: ({ maxHeight }: MaxHeight) => {
|
528
|
+
return maxHeight ? { maxHeight } : {};
|
529
|
+
},
|
530
|
+
|
531
|
+
minHeightProps: ({ minHeight }: MinHeight) => {
|
532
|
+
return minHeight ? { minHeight } : {};
|
533
|
+
},
|
502
534
|
}
|
503
535
|
|
504
536
|
type DefaultProps = {[key: string]: string} | Record<string, unknown>
|
@@ -510,6 +542,16 @@ export const globalProps = (props: GlobalProps, defaultProps: DefaultProps = {})
|
|
510
542
|
}).filter((value) => value?.length > 0).join(" ")
|
511
543
|
}
|
512
544
|
|
545
|
+
// New function for inline styles
|
546
|
+
export const globalInlineProps = (props: GlobalProps): React.CSSProperties => {
|
547
|
+
const styles = Object.keys(PROP_INLINE_CATEGORIES).reduce((acc, key) => {
|
548
|
+
const result = PROP_INLINE_CATEGORIES[key](props);
|
549
|
+
return { ...acc, ...(typeof result === 'object' ? result : {}) }; // Ensure result is an object before spreading
|
550
|
+
}, {});
|
551
|
+
|
552
|
+
return styles; // Return the styles object directly
|
553
|
+
}
|
554
|
+
|
513
555
|
|
514
556
|
export const deprecatedProps = (): void => {
|
515
557
|
// if (process.env.NODE_ENV === 'development') {
|