playbook_ui 15.4.0.pre.alpha.PLAY2465improvetruncation12292 → 15.4.0.pre.alpha.PLAY2582rails722112532

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +2 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +3 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_editing.jsx +3 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +2 -1
  8. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +21 -8
  9. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +6 -2
  10. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +3 -0
  11. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +24 -0
  12. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.html.erb +9 -0
  13. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.jsx +24 -0
  14. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_rails.md +1 -0
  15. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_react.md +1 -0
  16. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -2
  17. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +1 -2
  18. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +2 -2
  19. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +2 -0
  20. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -0
  21. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -0
  22. data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.md +1 -0
  23. data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_rails.md +1 -0
  24. data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_react.md +1 -0
  25. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +10 -0
  26. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +10 -0
  27. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.md +1 -0
  28. data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_rails.md +1 -0
  29. data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_react.md +1 -0
  30. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +7 -0
  31. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +7 -0
  32. data/app/pb_kits/playbook/pb_currency/docs/_description.md +2 -2
  33. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +44 -3
  34. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +3 -0
  35. data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +1 -0
  36. data/app/pb_kits/playbook/pb_date_time/date_time.rb +1 -0
  37. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.html.erb +4 -0
  38. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.jsx +14 -0
  39. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_rails.md +1 -0
  40. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_react.md +1 -0
  41. data/app/pb_kits/playbook/pb_date_time/docs/example.yml +3 -1
  42. data/app/pb_kits/playbook/pb_date_time/docs/index.js +1 -0
  43. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +3 -0
  44. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +2 -2
  45. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.rb +2 -0
  46. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +33 -0
  47. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.html.erb +4 -0
  48. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.jsx +22 -0
  49. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.md +1 -0
  50. data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +3 -1
  51. data/app/pb_kits/playbook/pb_date_time_stacked/docs/index.js +1 -0
  52. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +2 -2
  53. data/app/pb_kits/playbook/pb_dropdown/index.js +31 -13
  54. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +2 -1
  55. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.jsx +2 -1
  56. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +2 -1
  57. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +2 -1
  58. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.jsx +4 -1
  59. data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +1 -1
  60. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +3 -1
  61. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +1 -1
  62. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +1 -1
  63. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.md +1 -0
  64. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +1 -1
  65. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +1 -1
  66. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +1 -1
  67. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +1 -2
  68. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +1 -1
  69. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +1 -1
  70. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.md +11 -0
  71. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +1 -1
  72. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +1 -1
  73. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +1 -2
  74. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +1 -2
  75. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +3 -1
  76. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +2 -1
  77. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +2 -1
  78. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +1 -1
  79. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md +2 -1
  80. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +2 -1
  81. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +1 -1
  82. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +1 -1
  83. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +1 -1
  84. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.md +1 -0
  85. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +1 -1
  86. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +2 -1
  87. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +1 -1
  88. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +1 -1
  89. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +3 -1
  90. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +1 -1
  91. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +2 -2
  92. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +2 -1
  93. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.md +1 -0
  94. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +2 -1
  95. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +2 -1
  96. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +2 -1
  97. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +2 -1
  98. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +3 -1
  99. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +1 -1
  100. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.md +1 -0
  101. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +1 -1
  102. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +4 -1
  103. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +384 -262
  104. data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -5
  105. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.html.erb +14 -0
  106. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.jsx +29 -0
  107. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.md +3 -0
  108. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.jsx +31 -0
  109. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.md +1 -0
  110. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +4 -1
  111. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +14 -3
  112. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.md +3 -0
  113. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.md +3 -0
  114. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.html.erb +1 -7
  115. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.md +1 -0
  116. data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +3 -0
  117. data/app/pb_kits/playbook/pb_progress_step/docs/index.js +2 -0
  118. data/app/pb_kits/playbook/pb_progress_step/progress_step.test.js +41 -0
  119. data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +3 -1
  120. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +1 -1
  121. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +8 -61
  122. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.html.erb +2 -10
  123. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +11 -19
  124. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.html.erb +1 -5
  125. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.html.erb +1 -1
  126. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -2
  127. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +7 -16
  128. data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +3 -1
  129. data/app/pb_kits/playbook/pb_table/_table.tsx +28 -26
  130. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.jsx +4 -1
  131. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +4 -0
  132. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -0
  133. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +2 -1
  134. data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +1 -1
  135. data/app/pb_kits/playbook/utilities/globalProps.ts +26 -8
  136. data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +18 -0
  137. data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +18 -0
  138. data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +18 -0
  139. data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +18 -0
  140. data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +18 -0
  141. data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +18 -0
  142. data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +18 -0
  143. data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +18 -0
  144. data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +18 -0
  145. data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +18 -0
  146. data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +18 -0
  147. data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +18 -0
  148. data/dist/chunks/_typeahead-Cd3O38ts.js +6 -0
  149. data/dist/chunks/lib-CgpqUb6l.js +29 -0
  150. data/dist/chunks/vendor.js +37 -1
  151. data/dist/playbook-rails-react-bindings.js +1 -1
  152. data/dist/playbook-rails.js +1 -1
  153. data/dist/playbook.css +1 -1
  154. data/lib/playbook/version.rb +1 -1
  155. metadata +34 -12
  156. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default_rails.md +0 -7
  157. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline_rails.md +0 -1
  158. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky_rails.md +0 -1
  159. data/dist/chunks/_line_graph-eQNOB_GQ.js +0 -1
  160. data/dist/chunks/_typeahead-vbfetkuE.js +0 -24
  161. data/dist/chunks/_weekday_stacked-CvJHyUq6.js +0 -37
  162. data/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
  163. data/dist/chunks/lib-BCrK6CFU.js +0 -29
  164. data/dist/chunks/pb_form_validation-Cj4vdjWI.js +0 -1
  165. data/dist/playbook-doc.js +0 -1
@@ -1,5 +1,8 @@
1
1
  import React from 'react'
2
- import { Button, Tooltip, Flex, FlexItem } from 'playbook-ui';
2
+ import Tooltip from '../_tooltip'
3
+ import Button from '../../pb_button/_button'
4
+ import Flex from '../../pb_flex/_flex'
5
+ import FlexItem from '../../pb_flex/_flex_item'
3
6
 
4
7
  const TooltipSizing = (props) => {
5
8
 
@@ -161,6 +161,10 @@
161
161
  .typeahead-plus-icon {
162
162
  color: $text_lt_lighter;
163
163
  }
164
+ .pb_badge_kit_primary {
165
+ margin-bottom: 2px;
166
+ margin-top: 2px;
167
+ }
164
168
  .pb_badge_kit_primary span {
165
169
  line-height: 16.5px;
166
170
  letter-spacing: normal;
@@ -62,6 +62,7 @@ const MultiValue = (props: Props) => {
62
62
  className={pillClassName}
63
63
  closeProps={removeProps}
64
64
  htmlOptions={{onKeyDown:handleKeyDown}}
65
+ marginRight="xs"
65
66
  removeIcon
66
67
  tabIndex={0}
67
68
  text={label}
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
 
3
- import { Typeahead, Title } from 'playbook-ui'
3
+ import Typeahead from '../_typeahead'
4
+ import Title from '../../pb_title/_title'
4
5
  import { useForm } from 'react-hook-form'
5
6
 
6
7
  const languages = [
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { User } from 'playbook-ui'
2
+ import User from '../../pb_user/_user'
3
3
 
4
4
  const UserFontOptions = (props) => {
5
5
  return (
@@ -213,10 +213,24 @@ export type GlobalProps = AlignContent & AlignItems & AlignSelf &
213
213
 
214
214
  const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
215
215
  const keys: string[] = Object.keys(prop)
216
- return keys.map((size: Sizes) => {
217
- const propValue: string = typeof(prop[size]) === 'string' ? camelToSnakeCase(prop[size]) : prop[size]
218
- return `${classPrefix}_${size}_${propValue}`
219
- }).join(" ")
216
+ const screenSizeValues = ["xs", "sm", "md", "lg", "xl"]
217
+ let classResult = ''
218
+
219
+ // Handle default value separately (generates base class without size prefix)
220
+ if (prop.default !== undefined) {
221
+ const defaultValue: string = typeof(prop.default) === 'string' ? camelToSnakeCase(prop.default) : prop.default
222
+ classResult += `${classPrefix}_${defaultValue} `
223
+ }
224
+
225
+ // Handle responsive sizes (generates classes with size prefix)
226
+ keys.forEach((key) => {
227
+ if (screenSizeValues.includes(key)) {
228
+ const propValue: string = typeof(prop[key]) === 'string' ? camelToSnakeCase(prop[key]) : prop[key]
229
+ classResult += `${classPrefix}_${key}_${propValue} `
230
+ }
231
+ })
232
+
233
+ return classResult.trim()
220
234
  }
221
235
 
222
236
  //reusable function for top, bottom, right and left props
@@ -436,9 +450,11 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
436
450
  if (typeof zIndexEntry[1] == "number") {
437
451
  css += `z_index_${zIndexEntry[1]} `
438
452
  } else if (typeof zIndexEntry[1] == "object") {
439
- Object.entries(zIndexEntry[1]).forEach((zIndexObj) => {
440
- css += `z_index_${zIndexObj[0]}_${zIndexObj[1]} `
453
+ const responsiveObj: {[key: string]: string} = {}
454
+ Object.entries(zIndexEntry[1]).forEach(([key, value]) => {
455
+ responsiveObj[key] = value.toString()
441
456
  })
457
+ css += getResponsivePropClasses(responsiveObj, 'z_index')
442
458
  } else if (zIndexEntry[1] === 'max') {
443
459
  css += `z_index_max `
444
460
  }
@@ -463,9 +479,11 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
463
479
  if (typeof displayEntry[1] == "string") {
464
480
  css += `display_${displayEntry[1]} `
465
481
  } else if (typeof displayEntry[1] == "object") {
466
- Object.entries(displayEntry[1]).forEach((displayObj) => {
467
- css += `display_${displayObj[0]}_${displayObj[1]} `
482
+ const responsiveObj: {[key: string]: string} = {}
483
+ Object.entries(displayEntry[1]).forEach(([key, value]) => {
484
+ responsiveObj[key] = typeof value === 'string' ? value : value.toString()
468
485
  })
486
+ css += getResponsivePropClasses(responsiveObj, 'display')
469
487
  } else {
470
488
  ' '
471
489
  }
@@ -35,3 +35,21 @@ test('Global Props: returns proper class name', () => {
35
35
  })
36
36
  }
37
37
  })
38
+
39
+ test('Global Props: returns proper class name with default key', () => {
40
+ const testId = `${testSubject}-default-responsive`
41
+ render(
42
+ <Body
43
+ alignContent={{ default: "spaceAround", xs: "center", sm: "spaceAround", md: "center" }}
44
+ data={{ testid: testId }}
45
+ text="Hi"
46
+ />
47
+ )
48
+ const kit = screen.getByTestId(testId)
49
+ // Should have base class for default value
50
+ expect(kit).toHaveClass(`align_content_space_around`)
51
+ // Should have responsive classes for screen sizes
52
+ expect(kit).toHaveClass(`align_content_xs_center`)
53
+ expect(kit).toHaveClass(`align_content_sm_space_around`)
54
+ expect(kit).toHaveClass(`align_content_md_center`)
55
+ })
@@ -34,3 +34,21 @@ test('Global Props: returns proper class name', () => {
34
34
  })
35
35
  }
36
36
  })
37
+
38
+ test('Global Props: returns proper class name with default key', () => {
39
+ const testId = `${testSubject}-default-responsive`
40
+ render(
41
+ <Body
42
+ alignItems={{ default: "end", xs: "center", sm: "end", md: "center" }}
43
+ data={{ testid: testId }}
44
+ text="Hi"
45
+ />
46
+ )
47
+ const kit = screen.getByTestId(testId)
48
+ // Should have base class for default value
49
+ expect(kit).toHaveClass(`align_items_end`)
50
+ // Should have responsive classes for screen sizes
51
+ expect(kit).toHaveClass(`align_items_xs_center`)
52
+ expect(kit).toHaveClass(`align_items_sm_end`)
53
+ expect(kit).toHaveClass(`align_items_md_center`)
54
+ })
@@ -35,3 +35,21 @@ test('Global Props: returns proper class name', () => {
35
35
  })
36
36
  }
37
37
  })
38
+
39
+ test('Global Props: returns proper class name with default key', () => {
40
+ const testId = `${testSubject}-default-responsive`
41
+ render(
42
+ <Body
43
+ alignSelf={{ default: "end", xs: "center", sm: "end", md: "center" }}
44
+ data={{ testid: testId }}
45
+ text="Hi"
46
+ />
47
+ )
48
+ const kit = screen.getByTestId(testId)
49
+ // Should have base class for default value
50
+ expect(kit).toHaveClass(`align_self_end`)
51
+ // Should have responsive classes for screen sizes
52
+ expect(kit).toHaveClass(`align_self_xs_center`)
53
+ expect(kit).toHaveClass(`align_self_sm_end`)
54
+ expect(kit).toHaveClass(`align_self_md_center`)
55
+ })
@@ -36,3 +36,21 @@ test('Global Props: returns proper class name', () => {
36
36
  })
37
37
  }
38
38
  })
39
+
40
+ test('Global Props: returns proper class name with default key', () => {
41
+ const testId = `${testSubject}-default-responsive`
42
+ render(
43
+ <Body
44
+ data={{ testid: testId }}
45
+ display={{ default: "none", xs: "block", sm: "none", md: "block" }}
46
+ text="Hi"
47
+ />
48
+ )
49
+ const kit = screen.getByTestId(testId)
50
+ // Should have base class for default value
51
+ expect(kit).toHaveClass(`display_none`)
52
+ // Should have responsive classes for screen sizes
53
+ expect(kit).toHaveClass(`display_xs_block`)
54
+ expect(kit).toHaveClass(`display_sm_none`)
55
+ expect(kit).toHaveClass(`display_md_block`)
56
+ })
@@ -62,3 +62,21 @@ test('Global Props: returns proper class name', () => {
62
62
  })
63
63
  }
64
64
  })
65
+
66
+ test('Global Props: returns proper class name with default key', () => {
67
+ const testId = `${testSubject}-default-responsive`
68
+ render(
69
+ <Body
70
+ data={{ testid: testId }}
71
+ flex={{ default: "3", xs: "1", sm: "3", md: "1" }}
72
+ text="Hi"
73
+ />
74
+ )
75
+ const kit = screen.getByTestId(testId)
76
+ // Should have base class for default value
77
+ expect(kit).toHaveClass(`flex_3`)
78
+ // Should have responsive classes for screen sizes
79
+ expect(kit).toHaveClass(`flex_xs_1`)
80
+ expect(kit).toHaveClass(`flex_sm_3`)
81
+ expect(kit).toHaveClass(`flex_md_1`)
82
+ })
@@ -35,3 +35,21 @@ test('Global Props: returns proper class name', () => {
35
35
  })
36
36
  }
37
37
  })
38
+
39
+ test('Global Props: returns proper class name with default key', () => {
40
+ const testId = `${testSubject}-default-responsive`
41
+ render(
42
+ <Body
43
+ data={{ testid: testId }}
44
+ flexDirection={{ default: "column", xs: "row", sm: "column", md: "row" }}
45
+ text="Hi"
46
+ />
47
+ )
48
+ const kit = screen.getByTestId(testId)
49
+ // Should have base class for default value
50
+ expect(kit).toHaveClass(`flex_direction_column`)
51
+ // Should have responsive classes for screen sizes
52
+ expect(kit).toHaveClass(`flex_direction_xs_row`)
53
+ expect(kit).toHaveClass(`flex_direction_sm_column`)
54
+ expect(kit).toHaveClass(`flex_direction_md_row`)
55
+ })
@@ -33,3 +33,21 @@ test('Global Props: Returns ordinal suffixed class name', () => {
33
33
  })
34
34
  }
35
35
  })
36
+
37
+ test('Global Props: returns proper class name with default key', () => {
38
+ const testId = `${testSubject}-default-responsive`
39
+ render(
40
+ <Body
41
+ data={{ testid: testId }}
42
+ flexGrow={{ default: 1, xs: 0, sm: 1, md: 0 }}
43
+ text="Hi"
44
+ />
45
+ )
46
+ const kit = screen.getByTestId(testId)
47
+ // Should have base class for default value
48
+ expect(kit).toHaveClass(`flex_grow_1`)
49
+ // Should have responsive classes for screen sizes
50
+ expect(kit).toHaveClass(`flex_grow_xs_0`)
51
+ expect(kit).toHaveClass(`flex_grow_sm_1`)
52
+ expect(kit).toHaveClass(`flex_grow_md_0`)
53
+ })
@@ -33,3 +33,21 @@ test('Global Props: Returns ordinal suffixed class name', () => {
33
33
  })
34
34
  }
35
35
  })
36
+
37
+ test('Global Props: returns proper class name with default key', () => {
38
+ const testId = `${testSubject}-default-responsive`
39
+ render(
40
+ <Body
41
+ data={{ testid: testId }}
42
+ flexShrink={{ default: 0, xs: 1, sm: 0, md: 1 }}
43
+ text="Hi"
44
+ />
45
+ )
46
+ const kit = screen.getByTestId(testId)
47
+ // Should have base class for default value
48
+ expect(kit).toHaveClass(`flex_shrink_0`)
49
+ // Should have responsive classes for screen sizes
50
+ expect(kit).toHaveClass(`flex_shrink_xs_1`)
51
+ expect(kit).toHaveClass(`flex_shrink_sm_0`)
52
+ expect(kit).toHaveClass(`flex_shrink_md_1`)
53
+ })
@@ -35,3 +35,21 @@ test('Global Props: returns proper class name', () => {
35
35
  })
36
36
  }
37
37
  })
38
+
39
+ test('Global Props: returns proper class name with default key', () => {
40
+ const testId = `${testSubject}-default-responsive`
41
+ render(
42
+ <Body
43
+ data={{ testid: testId }}
44
+ flexWrap={{ default: "wrap", xs: "nowrap", sm: "wrap", md: "nowrap" }}
45
+ text="Hi"
46
+ />
47
+ )
48
+ const kit = screen.getByTestId(testId)
49
+ // Should have base class for default value
50
+ expect(kit).toHaveClass(`flex_wrap_wrap`)
51
+ // Should have responsive classes for screen sizes
52
+ expect(kit).toHaveClass(`flex_wrap_xs_nowrap`)
53
+ expect(kit).toHaveClass(`flex_wrap_sm_wrap`)
54
+ expect(kit).toHaveClass(`flex_wrap_md_nowrap`)
55
+ })
@@ -35,3 +35,21 @@ test('Global Props: returns proper class name', () => {
35
35
  })
36
36
  }
37
37
  })
38
+
39
+ test('Global Props: returns proper class name with default key', () => {
40
+ const testId = `${testSubject}-default-responsive`
41
+ render(
42
+ <Body
43
+ data={{ testid: testId }}
44
+ justifyContent={{ default: "spaceBetween", xs: "start", sm: "spaceBetween", md: "start" }}
45
+ text="Hi"
46
+ />
47
+ )
48
+ const kit = screen.getByTestId(testId)
49
+ // Should have base class for default value
50
+ expect(kit).toHaveClass(`justify_content_space_between`)
51
+ // Should have responsive classes for screen sizes
52
+ expect(kit).toHaveClass(`justify_content_xs_start`)
53
+ expect(kit).toHaveClass(`justify_content_sm_space_between`)
54
+ expect(kit).toHaveClass(`justify_content_md_start`)
55
+ })
@@ -35,3 +35,21 @@ test('Global Props: returns proper class name', () => {
35
35
  })
36
36
  }
37
37
  })
38
+
39
+ test('Global Props: returns proper class name with default key', () => {
40
+ const testId = `${testSubject}-default-responsive`
41
+ render(
42
+ <Body
43
+ data={{ testid: testId }}
44
+ justifySelf={{ default: "end", xs: "start", sm: "end", md: "center" }}
45
+ text="Hi"
46
+ />
47
+ )
48
+ const kit = screen.getByTestId(testId)
49
+ // Should have base class for default value
50
+ expect(kit).toHaveClass(`justify_self_end`)
51
+ // Should have responsive classes for screen sizes
52
+ expect(kit).toHaveClass(`justify_self_xs_start`)
53
+ expect(kit).toHaveClass(`justify_self_sm_end`)
54
+ expect(kit).toHaveClass(`justify_self_md_center`)
55
+ })
@@ -33,3 +33,21 @@ test('Global Props: Returns ordinal suffixed class name', () => {
33
33
  })
34
34
  }
35
35
  })
36
+
37
+ test('Global Props: returns proper class name with default key', () => {
38
+ const testId = `${testSubject}-default-responsive`
39
+ render(
40
+ <Body
41
+ data={{ testid: testId }}
42
+ order={{ default: 3, xs: 1, sm: 3, md: 1 }}
43
+ text="Hi"
44
+ />
45
+ )
46
+ const kit = screen.getByTestId(testId)
47
+ // Should have base class for default value
48
+ expect(kit).toHaveClass(`flex_order_3`)
49
+ // Should have responsive classes for screen sizes
50
+ expect(kit).toHaveClass(`flex_order_xs_1`)
51
+ expect(kit).toHaveClass(`flex_order_sm_3`)
52
+ expect(kit).toHaveClass(`flex_order_md_1`)
53
+ })