playbook_ui 14.6.2 → 14.7.0.pre.alpha.PBNTR637quickpickdefaultdate4478

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +3 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +8 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +21 -28
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +37 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx +13 -2
  7. data/app/pb_kits/playbook/pb_card/_card.tsx +11 -4
  8. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -2
  9. data/app/pb_kits/playbook/pb_card/docs/_card_light.md +1 -1
  10. data/app/pb_kits/playbook/pb_currency/_currency.tsx +16 -6
  11. data/app/pb_kits/playbook/pb_currency/currency.rb +38 -11
  12. data/app/pb_kits/playbook/pb_currency/currency.test.js +35 -0
  13. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.html.erb +7 -0
  14. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.jsx +18 -0
  15. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.md +3 -0
  16. data/app/pb_kits/playbook/pb_currency/docs/example.yml +3 -1
  17. data/app/pb_kits/playbook/pb_currency/docs/index.js +1 -0
  18. data/app/pb_kits/playbook/pb_date/_date.scss +3 -0
  19. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +1 -1
  20. data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +16 -1
  21. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +5 -1
  22. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.html.erb +26 -0
  23. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md +7 -0
  24. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +38 -0
  25. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +0 -0
  26. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +19 -0
  27. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +6 -0
  28. data/app/pb_kits/playbook/pb_draggable/draggable.html.erb +3 -0
  29. data/app/pb_kits/playbook/pb_draggable/draggable.rb +18 -0
  30. data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +3 -0
  31. data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +15 -0
  32. data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +7 -0
  33. data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +18 -0
  34. data/app/pb_kits/playbook/pb_draggable/index.js +125 -0
  35. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +8 -7
  36. data/app/pb_kits/playbook/pb_flex/_flex.tsx +3 -1
  37. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +8 -2
  38. data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +3 -6
  39. data/app/pb_kits/playbook/pb_flex/flex_item.rb +7 -2
  40. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +6 -2
  41. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +30 -26
  42. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +24 -1
  43. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +25 -2
  44. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +3 -0
  45. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +1 -0
  46. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +46 -8
  47. data/app/pb_kits/playbook/pb_link/_link.scss +66 -0
  48. data/app/pb_kits/playbook/pb_link/_link.tsx +107 -0
  49. data/app/pb_kits/playbook/pb_link/docs/_link_color.html.erb +30 -0
  50. data/app/pb_kits/playbook/pb_link/docs/_link_color.jsx +40 -0
  51. data/app/pb_kits/playbook/pb_link/docs/_link_disabled.html.erb +5 -0
  52. data/app/pb_kits/playbook/pb_link/docs/_link_disabled.jsx +15 -0
  53. data/app/pb_kits/playbook/pb_link/docs/_link_icon.html.erb +15 -0
  54. data/app/pb_kits/playbook/pb_link/docs/_link_icon.jsx +25 -0
  55. data/app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb +35 -0
  56. data/app/pb_kits/playbook/pb_link/docs/_link_tag.jsx +45 -0
  57. data/app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb +5 -0
  58. data/app/pb_kits/playbook/pb_link/docs/_link_underline.jsx +15 -0
  59. data/app/pb_kits/playbook/pb_link/docs/example.yml +16 -0
  60. data/app/pb_kits/playbook/pb_link/docs/index.js +5 -0
  61. data/app/pb_kits/playbook/pb_link/link.html.erb +21 -0
  62. data/app/pb_kits/playbook/pb_link/link.rb +44 -0
  63. data/app/pb_kits/playbook/pb_link/link.test.jsx +92 -0
  64. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
  65. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +67 -1
  66. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -0
  67. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
  68. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +5 -1
  69. data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +37 -0
  70. data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.tsx +67 -0
  71. data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading_mixins.scss +40 -0
  72. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.jsx +51 -0
  73. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.md +1 -0
  74. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.jsx +26 -0
  75. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.md +1 -0
  76. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +1 -0
  77. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.jsx +11 -0
  78. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +59 -0
  79. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.md +3 -0
  80. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.jsx +20 -0
  81. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.md +3 -0
  82. data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +13 -0
  83. data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +5 -0
  84. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +12 -0
  85. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +8 -0
  86. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.test.jsx +81 -0
  87. data/app/pb_kits/playbook/pb_timeline/_item.tsx +59 -23
  88. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +8 -0
  89. data/app/pb_kits/playbook/pb_timeline/detail.html.erb +3 -0
  90. data/app/pb_kits/playbook/pb_timeline/detail.rb +11 -0
  91. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +43 -0
  92. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +68 -0
  93. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +2 -0
  94. data/app/pb_kits/playbook/pb_timeline/docs/example.yml +2 -1
  95. data/app/pb_kits/playbook/pb_timeline/docs/index.js +1 -0
  96. data/app/pb_kits/playbook/pb_timeline/item.html.erb +17 -21
  97. data/app/pb_kits/playbook/pb_timeline/item.rb +4 -0
  98. data/app/pb_kits/playbook/pb_timeline/label.html.erb +12 -0
  99. data/app/pb_kits/playbook/pb_timeline/label.rb +13 -0
  100. data/app/pb_kits/playbook/pb_timeline/step.html.erb +14 -0
  101. data/app/pb_kits/playbook/pb_timeline/step.rb +16 -0
  102. data/app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx +29 -0
  103. data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +38 -0
  104. data/app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx +42 -0
  105. data/app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx +3 -0
  106. data/app/pb_kits/playbook/pb_timeline/timeline.test.js +84 -0
  107. data/app/pb_kits/playbook/tokens/_typography.scss +35 -0
  108. data/app/pb_kits/playbook/utilities/_hover.scss +46 -43
  109. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +4 -0
  110. data/app/pb_kits/playbook/utilities/globalProps.ts +44 -2
  111. data/dist/chunks/_typeahead-BXzFhaTy.js +22 -0
  112. data/dist/chunks/_weekday_stacked-CWQekIDV.js +45 -0
  113. data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
  114. data/dist/chunks/{lib-D-mTv-kp.js → lib-lcEbe0vX.js} +1 -1
  115. data/dist/chunks/{pb_form_validation-BkWGwJsl.js → pb_form_validation-yoi2KCvh.js} +1 -1
  116. data/dist/chunks/vendor.js +1 -1
  117. data/dist/menu.yml +8 -2
  118. data/dist/playbook-doc.js +1 -1
  119. data/dist/playbook-rails-react-bindings.js +1 -1
  120. data/dist/playbook-rails.js +1 -1
  121. data/dist/playbook.css +1 -1
  122. data/lib/playbook/hover.rb +4 -1
  123. data/lib/playbook/kit_base.rb +43 -5
  124. data/lib/playbook/version.rb +2 -2
  125. metadata +75 -11
  126. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
  127. data/dist/chunks/_typeahead-BV_n6U5W.js +0 -22
  128. data/dist/chunks/_weekday_stacked-Cy__g00H.js +0 -45
  129. data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
@@ -1,51 +1,54 @@
1
1
  @import "../tokens/exports/scale.module";
2
2
 
3
- @mixin hover-color-classes($colors-list) {
4
- @each $name, $color in $colors-list {
5
- .hover_background_#{"" + $name}:hover {
6
- background-color: $color !important;
7
- transition: background-color $transition-speed ease;
8
- }
9
- .hover_color_#{"" + $name}:hover {
10
- color: $color !important;
11
- transition: color $transition-speed ease;
12
- }
3
+ @mixin hover-scale-classes($scales-list) {
4
+ @each $name, $scale in $scales-list {
5
+ .hover_#{"" + $name}:hover,
6
+ .group_hover:hover .group_hover.hover_#{"" + $name} {
7
+ transform: $scale;
8
+ transition: transform $transition-speed ease;
13
9
  }
14
10
  }
15
-
16
- @mixin hover-shadow-classes($shadows-list) {
17
- @each $name, $shadow in $shadows-list {
18
- .hover_#{"" + $name}:hover {
19
- box-shadow: $shadow;
20
- transition: box-shadow $transition-speed ease;
21
- }
11
+ }
12
+
13
+ @mixin hover-shadow-classes($shadows-list) {
14
+ @each $name, $shadow in $shadows-list {
15
+ .hover_#{"" + $name}:hover,
16
+ .group_hover:hover .group_hover.hover_#{"" + $name} {
17
+ box-shadow: $shadow;
18
+ transition: box-shadow $transition-speed ease;
22
19
  }
23
20
  }
24
-
25
- @mixin hover-scale-classes($scales-list) {
26
- @each $name, $scale in $scales-list {
27
- .hover_#{"" + $name}:hover {
28
- transform: $scale;
29
- transition: transform $transition-speed ease;
30
- }
21
+ }
22
+
23
+ @mixin hover-color-classes($colors-list) {
24
+ @each $name, $color in $colors-list {
25
+ .hover_background_#{"" + $name}:hover,
26
+ .group_hover:hover .group_hover.hover_background_#{"" + $name} {
27
+ background-color: $color !important;
28
+ transition: background-color $transition-speed ease;
29
+ }
30
+ .hover_color_#{"" + $name}:hover,
31
+ .group_hover:hover .group_hover.hover_color_#{"" + $name} {
32
+ color: $color !important;
33
+ transition: color $transition-speed ease;
31
34
  }
32
35
  }
33
-
34
-
35
- @include hover-scale-classes($scales);
36
- @include hover-shadow-classes($box_shadows);
37
- @include hover-color-classes($product_colors);
38
- @include hover-color-classes($status_colors);
39
- @include hover-color-classes($data_colors);
40
- @include hover-color-classes($shadow_colors);
41
- @include hover-color-classes($colors);
42
- @include hover-color-classes($interface_colors);
43
- @include hover-color-classes($main_colors);
44
- @include hover-color-classes($background_colors);
45
- @include hover-color-classes($card_colors);
46
- @include hover-color-classes($active_colors);
47
- @include hover-color-classes($action_colors);
48
- @include hover-color-classes($hover_colors);
49
- @include hover-color-classes($border_colors);
50
- @include hover-color-classes($text_colors);
51
- @include hover-color-classes($category_colors);
36
+ }
37
+
38
+ @include hover-scale-classes($scales);
39
+ @include hover-shadow-classes($box_shadows);
40
+ @include hover-color-classes($product_colors);
41
+ @include hover-color-classes($status_colors);
42
+ @include hover-color-classes($data_colors);
43
+ @include hover-color-classes($shadow_colors);
44
+ @include hover-color-classes($colors);
45
+ @include hover-color-classes($interface_colors);
46
+ @include hover-color-classes($main_colors);
47
+ @include hover-color-classes($background_colors);
48
+ @include hover-color-classes($card_colors);
49
+ @include hover-color-classes($active_colors);
50
+ @include hover-color-classes($action_colors);
51
+ @include hover-color-classes($hover_colors);
52
+ @include hover-color-classes($border_colors);
53
+ @include hover-color-classes($text_colors);
54
+ @include hover-color-classes($category_colors);
@@ -1,9 +1,13 @@
1
1
  export default [
2
+ "minHeight",
3
+ "maxHeight",
4
+ "height",
2
5
  "left",
3
6
  "bottom",
4
7
  "right",
5
8
  "top",
6
9
  "hover",
10
+ "groupHover",
7
11
  "zIndex",
8
12
  "verticalAlign",
9
13
  "truncate",
@@ -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') {