playbook_ui 14.8.0.pre.rc.8 → 14.9.0.pre.alpha.PBNTR686advancedtablepaginationpoc4747

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +61 -17
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.html.erb +53 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.md +5 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +50 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +1 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +57 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +5 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +5600 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +3 -1
  16. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +15 -0
  17. data/app/pb_kits/playbook/pb_background/_background.tsx +8 -2
  18. data/app/pb_kits/playbook/pb_button/_button.scss +6 -0
  19. data/app/pb_kits/playbook/pb_button/_button.tsx +1 -3
  20. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +15 -0
  21. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  22. data/app/pb_kits/playbook/pb_button/docs/_button_default.html.erb +1 -0
  23. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +8 -0
  24. data/app/pb_kits/playbook/pb_button/docs/_button_default.md +1 -1
  25. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
  26. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +0 -4
  27. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +84 -7
  28. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +3 -1
  29. data/app/pb_kits/playbook/pb_currency/_currency.tsx +7 -3
  30. data/app/pb_kits/playbook/pb_currency/currency.html.erb +2 -2
  31. data/app/pb_kits/playbook/pb_currency/currency.rb +17 -1
  32. data/app/pb_kits/playbook/pb_currency/currency.test.js +40 -3
  33. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +4 -0
  34. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +16 -0
  35. data/app/pb_kits/playbook/pb_currency/docs/example.yml +2 -0
  36. data/app/pb_kits/playbook/pb_currency/docs/index.js +1 -0
  37. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +1 -0
  38. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +159 -45
  39. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +31 -0
  40. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +6 -0
  41. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -1
  42. data/app/pb_kits/playbook/pb_drawer/docs/index.js +1 -0
  43. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -0
  44. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +0 -1
  45. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +0 -4
  46. data/app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx +13 -2
  47. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
  48. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  49. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +63 -12
  50. data/app/pb_kits/playbook/pb_image/_image.tsx +3 -1
  51. data/app/pb_kits/playbook/pb_layout/_layout.tsx +6 -3
  52. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +3 -1
  53. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +2 -2
  54. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +5 -3
  55. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +3 -2
  56. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.rb +5 -0
  57. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +3 -1
  58. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +2 -1
  59. data/app/pb_kits/playbook/pb_table/_table.tsx +109 -25
  60. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +87 -0
  61. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +2 -0
  62. data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
  63. data/app/pb_kits/playbook/pb_table/styles/_all.scss +2 -0
  64. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +4 -0
  65. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +18 -0
  66. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +47 -0
  67. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +59 -0
  68. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +3 -0
  69. data/app/pb_kits/playbook/pb_typeahead/index.ts +29 -3
  70. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +5 -2
  71. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +4 -0
  72. data/app/pb_kits/playbook/tokens/_height.scss +19 -0
  73. data/app/pb_kits/playbook/tokens/exports/_height.module.scss +37 -0
  74. data/app/pb_kits/playbook/utilities/_height.scss +33 -0
  75. data/app/pb_kits/playbook/utilities/_max_width.scss +29 -9
  76. data/app/pb_kits/playbook/utilities/_min_width.scss +6 -2
  77. data/app/pb_kits/playbook/utilities/_width.scss +45 -0
  78. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -1
  79. data/app/pb_kits/playbook/utilities/globalProps.ts +37 -4
  80. data/dist/chunks/_typeahead-B8fkIeXA.js +22 -0
  81. data/dist/chunks/_weekday_stacked-DSEuqOLN.js +45 -0
  82. data/dist/chunks/{lib-BC6ESsxG.js → lib-SyD3buPZ.js} +1 -1
  83. data/dist/chunks/{pb_form_validation-B_Z9rEbg.js → pb_form_validation-Dt8UJgrJ.js} +1 -1
  84. data/dist/chunks/vendor.js +1 -1
  85. data/dist/menu.yml +321 -0
  86. data/dist/playbook-doc.js +1 -1
  87. data/dist/playbook-rails-react-bindings.js +1 -1
  88. data/dist/playbook-rails.js +1 -1
  89. data/dist/playbook.css +1 -1
  90. data/lib/playbook/classnames.rb +4 -0
  91. data/lib/playbook/forms/builder/typeahead_field.rb +13 -0
  92. data/lib/playbook/height.rb +29 -0
  93. data/lib/playbook/kit_base.rb +16 -1
  94. data/lib/playbook/max_height.rb +29 -0
  95. data/lib/playbook/min_height.rb +29 -0
  96. data/lib/playbook/spacing.rb +21 -0
  97. data/lib/playbook/version.rb +2 -2
  98. metadata +28 -6
  99. data/dist/chunks/_typeahead-D0PihN_3.js +0 -22
  100. data/dist/chunks/_weekday_stacked-uMIX8f-A.js +0 -45
@@ -0,0 +1,37 @@
1
+ @import "../height";
2
+
3
+ :export {
4
+ @mixin export_height($height_list) {
5
+ @each $name, $value in $height_list {
6
+ .#{$name} {
7
+ height: $value;
8
+ }
9
+ }
10
+ }
11
+
12
+ @include export_height($heights);
13
+ }
14
+
15
+ :export {
16
+ @mixin export_max_height($height_list) {
17
+ @each $name, $value in $height_list {
18
+ .max_#{$name} {
19
+ max-height: $value;
20
+ }
21
+ }
22
+ }
23
+
24
+ @include export_max_height($heights);
25
+ }
26
+
27
+ :export {
28
+ @mixin export_min_height($height_list) {
29
+ @each $name, $value in $height_list {
30
+ .min_#{$name} {
31
+ min-height: $value;
32
+ }
33
+ }
34
+ }
35
+
36
+ @include export_min_height($heights);
37
+ }
@@ -0,0 +1,33 @@
1
+ @import "../tokens/exports/height.module";
2
+
3
+ @mixin export_height($height_list) {
4
+ @each $name, $value in $height_list {
5
+ .#{$name} {
6
+ height: $value;
7
+ }
8
+ }
9
+ }
10
+
11
+ @mixin export_max_height($height_list) {
12
+ @each $name, $value in $height_list {
13
+ .max_#{$name} {
14
+ max-height: $value;
15
+ }
16
+ }
17
+ }
18
+
19
+ @mixin export_min_height($height_list) {
20
+ @each $name, $value in $height_list {
21
+ .min_#{$name} {
22
+ min-height: $value;
23
+ }
24
+ }
25
+ }
26
+
27
+ @include export_height($heights);
28
+ @include export_max_height($heights);
29
+ @include export_min_height($heights);
30
+
31
+ .height-resize {
32
+ resize: vertical;
33
+ }
@@ -1,29 +1,49 @@
1
- .max_width_xs {
2
- max-width: 360px;
3
- }
1
+ @import "../tokens/container";
2
+
4
3
  .max_width_0 {
5
- max-width: 0;
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: 540px;
24
+ max-width: $container_sm;
13
25
  }
14
26
 
15
27
  .max_width_md {
16
- max-width: 720px;
28
+ max-width: $container_md;
17
29
  }
18
30
 
19
31
  .max_width_lg {
20
- max-width: 960px;
32
+ max-width: $container_lg;
21
33
  }
22
34
 
23
35
  .max_width_xl {
24
- max-width: 1140px;
36
+ max-width: $container_xl;
25
37
  }
26
38
 
27
39
  .max_width_xxl {
28
- max-width: 1320px;
40
+ max-width: $container_xxl;
41
+ }
42
+
43
+ .max_width_100_percent {
44
+ max-width: $container_100;
45
+ }
46
+
47
+ .width-resize {
48
+ resize: horizontal;
29
49
  }
@@ -4,7 +4,11 @@
4
4
  min-width: map-get($containers, 'none');
5
5
  }
6
6
 
7
- .min_with_0_percent {
7
+ .min_width_none {
8
+ min-width: none;
9
+ }
10
+
11
+ .min_width_0_percent {
8
12
  min-width: $container_0;
9
13
  }
10
14
 
@@ -40,6 +44,6 @@
40
44
  min-width: $container_100;
41
45
  }
42
46
 
43
- .minwidth-resize {
47
+ .width-resize {
44
48
  resize: horizontal;
45
49
  }
@@ -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
+ }
@@ -7,7 +7,6 @@ export default [
7
7
  "right",
8
8
  "top",
9
9
  "hover",
10
- "groupHover",
11
10
  "zIndex",
12
11
  "verticalAlign",
13
12
  "truncate",
@@ -30,6 +29,7 @@ export default [
30
29
  "numberSpacing",
31
30
  "maxWidth",
32
31
  "minWidth",
32
+ "width",
33
33
  "marginRight",
34
34
  "marginLeft",
35
35
  "marginTop",
@@ -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?: Sizes,
103
+ maxWidth?: string,
100
104
  }
101
105
 
102
106
  type MinWidth = {
103
- minWidth?: Sizes,
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)} ` : ''
@@ -361,6 +370,30 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
361
370
  css += maxWidth ? `max_width_${filterClassName(maxWidth)} ` : ''
362
371
  return css.trimEnd()
363
372
  },
373
+ minHeightProps: ({ minHeight }: MinHeight) => {
374
+ const heightValues = ["auto", "xs", "sm", "md", "lg", "xl", "xxl", "xxxl"]
375
+ if (heightValues.includes(minHeight)) {
376
+ let css = ''
377
+ css += minHeight ? `min_height_${filterClassName(minHeight)} ` : ''
378
+ return css.trimEnd()
379
+ }
380
+ },
381
+ maxHeightProps: ({ maxHeight }: MaxHeight) => {
382
+ const heightValues = ["auto", "xs", "sm", "md", "lg", "xl", "xxl", "xxxl"]
383
+ if (heightValues.includes(maxHeight)) {
384
+ let css = ''
385
+ css += maxHeight ? `max_height_${filterClassName(maxHeight)} ` : ''
386
+ return css.trimEnd()
387
+ }
388
+ },
389
+ heightProps: ({ height }: Height) => {
390
+ const heightValues = ["auto", "xs", "sm", "md", "lg", "xl", "xxl", "xxxl"]
391
+ if (heightValues.includes(height)) {
392
+ let css = ''
393
+ css += height ? `height_${filterClassName(height)} ` : ''
394
+ return css.trimEnd()
395
+ }
396
+ },
364
397
  zIndexProps: (zIndex: ZIndex) => {
365
398
  let css = ''
366
399
  Object.entries(zIndex).forEach((zIndexEntry) => {