playbook_ui 15.4.0.pre.alpha.PLAY2627requiredmultiselectdropdownbug12442 → 15.4.0.pre.alpha.PLAY2640typeaheadmultikitbadgespacing12415

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +0 -3
  3. data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +0 -1
  4. data/app/pb_kits/playbook/pb_date_time/date_time.rb +0 -1
  5. data/app/pb_kits/playbook/pb_date_time/docs/example.yml +1 -3
  6. data/app/pb_kits/playbook/pb_date_time/docs/index.js +0 -1
  7. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +0 -3
  8. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +2 -2
  9. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.rb +0 -2
  10. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +0 -33
  11. data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +1 -3
  12. data/app/pb_kits/playbook/pb_date_time_stacked/docs/index.js +0 -1
  13. data/app/pb_kits/playbook/pb_dropdown/index.js +13 -31
  14. data/app/pb_kits/playbook/pb_table/_table.tsx +26 -28
  15. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +4 -0
  16. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -0
  17. data/app/pb_kits/playbook/utilities/globalProps.ts +8 -26
  18. data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +0 -18
  19. data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +0 -18
  20. data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +0 -18
  21. data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +0 -18
  22. data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +0 -18
  23. data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +0 -18
  24. data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +0 -18
  25. data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +0 -18
  26. data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +0 -18
  27. data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +0 -18
  28. data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +0 -18
  29. data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +0 -18
  30. data/dist/chunks/{_line_graph-BuucBJlH.js → _line_graph-CxZAFRDo.js} +1 -1
  31. data/dist/chunks/_typeahead-DYIGfk8o.js +6 -0
  32. data/dist/chunks/{_weekday_stacked-B4_b9xef.js → _weekday_stacked-B52YWU9Z.js} +2 -2
  33. data/dist/chunks/vendor.js +1 -1
  34. data/dist/playbook-doc.js +1 -1
  35. data/dist/playbook-rails-react-bindings.js +1 -1
  36. data/dist/playbook-rails.js +1 -1
  37. data/dist/playbook.css +1 -1
  38. data/lib/playbook/version.rb +1 -1
  39. metadata +5 -12
  40. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.html.erb +0 -4
  41. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.jsx +0 -14
  42. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_rails.md +0 -1
  43. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_react.md +0 -1
  44. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.html.erb +0 -4
  45. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.jsx +0 -22
  46. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.md +0 -1
  47. data/dist/chunks/_typeahead-VFd5WMRg.js +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e497d506916a6a8c97612016445cb48518fdd40aa15707f40be73898a84cee44
4
- data.tar.gz: 8d77efa786d47b2c5ee169e9b898c7d2b7e3202c8a63f728d7b73f93e4427244
3
+ metadata.gz: 3a79f50c7005e51f9647544f9ecad8561dd0eba490d7392867d247cc26152d57
4
+ data.tar.gz: 4d68e0342ca547569a384c873e5e4f9e8b35242c6180b37a3a6a2e107bbcd457
5
5
  SHA512:
6
- metadata.gz: 224b7a7ea3edd7d9fed655c2a4331cc314ac080a2705bcc492569d8a7d96912b767de9d429a2b7c3374f791e67fef5d61f58e17add18c298ea9686124ae7a08f
7
- data.tar.gz: ccd0e13f740be905e8851024c12b831759b2364fd96c4f39022527403daaa96ef31ab71ed79c4dec90a339362953a141e175249ec1096cd3ba6b6fe12d2b30b5
6
+ metadata.gz: 53a825e51f1fdd056c2a818f8ebff66256d82ef617d8ccdb206a7ee221c4b882c55a7513d91773b2083e109e8e577a8ebaf4f82eb655f99ccc3b041ee056d997
7
+ data.tar.gz: 2638946f9c1d16561f5b6a4b06465667fe79c590c3fc4e0ba63ddfee96986e7c48293358fab4d0c20aba9deb51bb40f2922eb575971913a596cec78b944446d3
@@ -17,7 +17,6 @@ type DateTimeProps = {
17
17
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
18
18
  id?: string,
19
19
  size?: "sm" | "md",
20
- showCurrentYear?: boolean,
21
20
  showDayOfWeek: boolean,
22
21
  showIcon?: boolean,
23
22
  timeZone?: string
@@ -33,7 +32,6 @@ const DateTime = (props: DateTimeProps): React.ReactElement => {
33
32
  showDayOfWeek = false,
34
33
  datetime,
35
34
  id,
36
- showCurrentYear = false,
37
35
  showIcon = false,
38
36
  size = 'md',
39
37
  timeZone = 'America/New_York',
@@ -61,7 +59,6 @@ const DateTime = (props: DateTimeProps): React.ReactElement => {
61
59
  vertical="baseline"
62
60
  >
63
61
  <FormattedDate
64
- showCurrentYear={showCurrentYear}
65
62
  showDayOfWeek={showDayOfWeek}
66
63
  size={size}
67
64
  value={datetime}
@@ -9,7 +9,6 @@
9
9
  dark: object.dark,
10
10
  date: object.date,
11
11
  show_day_of_week: object.show_day_of_week,
12
- show_current_year: object.show_current_year,
13
12
  size: object.size,
14
13
  timezone: object.timezone,
15
14
  }) %>
@@ -16,7 +16,6 @@ module Playbook
16
16
  prop :dark, type: Playbook::Props::Boolean, default: false
17
17
  prop :show_icon, type: Playbook::Props::Boolean, default: false
18
18
  prop :show_day_of_week, type: Playbook::Props::Boolean, default: false
19
- prop :show_current_year, type: Playbook::Props::Boolean, default: false
20
19
 
21
20
  def classname
22
21
  generate_classname("pb_date_time_kit", align)
@@ -1,16 +1,14 @@
1
1
  examples:
2
-
2
+
3
3
  rails:
4
4
  - date_time_default: Default
5
5
  - date_time_align: Alignment
6
6
  - date_time_size: Size
7
- - date_time_show_current_year: Show Current Year
8
7
 
9
8
  react:
10
9
  - date_time_default: Default
11
10
  - date_time_align: Alignment
12
11
  - date_time_size: Size
13
- - date_time_show_current_year: Show Current Year
14
12
 
15
13
  swift:
16
14
  - date_time_default_swift: Default
@@ -1,4 +1,3 @@
1
1
  export { default as DateTimeDefault } from './_date_time_default.jsx'
2
2
  export { default as DateTimeAlign } from './_date_time_align.jsx'
3
3
  export { default as DateTimeSize } from './_date_time_size.jsx'
4
- export { default as DateTimeShowCurrentYear } from './_date_time_show_current_year.jsx'
@@ -17,7 +17,6 @@ type DateTimeStackedProps = {
17
17
  datetime: Date,
18
18
  dark: boolean,
19
19
  timeZone?: string,
20
- showCurrentYear?: boolean,
21
20
  }
22
21
 
23
22
  const DateTimeStacked = (props: DateTimeStackedProps): React.ReactElement => {
@@ -29,7 +28,6 @@ const DateTimeStacked = (props: DateTimeStackedProps): React.ReactElement => {
29
28
  dark,
30
29
  htmlOptions = {},
31
30
  timeZone = 'America/New_York',
32
- showCurrentYear = false,
33
31
  } = props
34
32
 
35
33
  const classes = buildCss('pb_date_time_stacked_kit', globalProps(props))
@@ -48,7 +46,6 @@ const DateTimeStacked = (props: DateTimeStackedProps): React.ReactElement => {
48
46
  bold
49
47
  dark={dark}
50
48
  date={date || datetime}
51
- showCurrentYear={showCurrentYear}
52
49
  />
53
50
  </FlexItem>
54
51
 
@@ -1,8 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= pb_content_tag do %>
2
2
 
3
3
  <%= pb_rails("flex", props: {classname: "flex-container", vertical: "stretch"}) do %>
4
4
  <%= pb_rails("body", props: {classname: "flex-item"}) do %>
5
- <%= pb_rails("date_stacked", props: { date: object.date_time_value, size: "sm", align: "right", bold: true, dark: object.dark, show_current_year: object.show_current_year }) %>
5
+ <%= pb_rails("date_stacked", props: { date: object.date_time_value, size: "sm", align: "right", bold: true, dark: object.dark }) %>
6
6
  <% end %>
7
7
  <%= pb_rails("section_separator", props: { orientation: "vertical", classname: "date-time-padding" }) %>
8
8
  <%= pb_rails("body", props: {classname: "flex-item"}) do %>
@@ -10,8 +10,6 @@ module Playbook
10
10
  default: false
11
11
  prop :timezone, type: Playbook::Props::String,
12
12
  default: "America/New_York"
13
- prop :show_current_year, type: Playbook::Props::Boolean,
14
- default: false
15
13
 
16
14
  def date_time_value
17
15
  date || date_time
@@ -41,36 +41,3 @@ test('renders time in timezone', () => {
41
41
  const kit = renderKit(DateTimeStacked, props)
42
42
  expect(kit).toHaveTextContent(`${monthDayYear}11:00aMDT`)
43
43
  })
44
-
45
- test('renders current year when showCurrentYear is true', () => {
46
- const currentYearDate = new Date()
47
- const currentYear = currentYearDate.getFullYear()
48
-
49
- const kit = renderKit(DateTimeStacked, {
50
- data: { testid: 'datetimestacked-current-year' },
51
- datetime: currentYearDate,
52
- dark: false,
53
- showCurrentYear: true,
54
- })
55
- expect(kit).toHaveTextContent(currentYear.toString())
56
- })
57
-
58
- test('hides current year by default', () => {
59
- const currentYearDate = new Date()
60
- const currentYear = currentYearDate.getFullYear()
61
-
62
- const kit = renderKit(DateTimeStacked, {
63
- data: { testid: 'datetimestacked-hide-year' },
64
- datetime: currentYearDate,
65
- dark: false,
66
- })
67
-
68
- const yearElement = kit.querySelector('.pb_caption_kit_xs')
69
-
70
- if (yearElement) {
71
- expect(yearElement.textContent).not.toBe(currentYear.toString())
72
- } else {
73
-
74
- expect(yearElement).toBeNull()
75
- }
76
- })
@@ -2,11 +2,9 @@ examples:
2
2
 
3
3
  rails:
4
4
  - date_time_stacked_default: Default
5
- - date_time_stacked_show_current_year: Show Current Year
6
-
5
+
7
6
  react:
8
7
  - date_time_stacked_default: Default
9
- - date_time_stacked_show_current_year: Show Current Year
10
8
 
11
9
  swift:
12
10
  - date_time_stacked_default_swift: Default
@@ -1,2 +1 @@
1
1
  export { default as DateTimeStackedDefault } from './_date_time_stacked_default.jsx'
2
- export { default as DateTimeStackedShowCurrentYear } from './_date_time_stacked_show_current_year.jsx'
@@ -33,8 +33,6 @@ export default class PbDropdown extends PbEnhancedElement {
33
33
  this.formPillProps = this.element.dataset.formPillProps
34
34
  ? JSON.parse(this.element.dataset.formPillProps)
35
35
  : {};
36
- const baseInput = this.element.querySelector(DROPDOWN_INPUT);
37
- this.wasOriginallyRequired = baseInput && baseInput.hasAttribute("required");
38
36
  this.setDefaultValue();
39
37
  this.bindEventListeners();
40
38
  this.bindSearchInput();
@@ -358,6 +356,17 @@ export default class PbDropdown extends PbEnhancedElement {
358
356
  }
359
357
 
360
358
  clearFormValidation(input) {
359
+ if (input.checkValidity()) {
360
+ const dropdownWrapperElement = input.closest(".dropdown_wrapper");
361
+ dropdownWrapperElement.classList.remove("error");
362
+
363
+ const errorLabelElement = dropdownWrapperElement.querySelector(
364
+ ".pb_body_kit_negative"
365
+ );
366
+ if (errorLabelElement) {
367
+ errorLabelElement.remove();
368
+ }
369
+ }
361
370
  if (this.isMultiSelect) {
362
371
  if (this.selectedOptions.size > 0) {
363
372
  const dropdownWrapperElement = input.closest(".dropdown_wrapper");
@@ -368,19 +377,6 @@ export default class PbDropdown extends PbEnhancedElement {
368
377
  if (errorLabelElement) {
369
378
  errorLabelElement.remove();
370
379
  }
371
- return;
372
- }
373
- }
374
-
375
- if (input.checkValidity()) {
376
- const dropdownWrapperElement = input.closest(".dropdown_wrapper");
377
- dropdownWrapperElement.classList.remove("error");
378
-
379
- const errorLabelElement = dropdownWrapperElement.querySelector(
380
- ".pb_body_kit_negative"
381
- );
382
- if (errorLabelElement) {
383
- errorLabelElement.remove();
384
380
  }
385
381
  }
386
382
  }
@@ -589,9 +585,7 @@ export default class PbDropdown extends PbEnhancedElement {
589
585
  // for multi_select, for each selectedOption, create a hidden input
590
586
  const name = baseInput.getAttribute("name");
591
587
  this.selectedOptions.forEach((raw) => {
592
- const optionData = JSON.parse(raw);
593
- // Use id if available, otherwise fall back to value
594
- const id = optionData.id || optionData.value;
588
+ const id = JSON.parse(raw).id;
595
589
  const inp = document.createElement("input");
596
590
  inp.type = "hidden";
597
591
  inp.name = name;
@@ -599,19 +593,7 @@ export default class PbDropdown extends PbEnhancedElement {
599
593
  inp.dataset.generated = "true";
600
594
  baseInput.insertAdjacentElement("afterend", inp);
601
595
  });
602
-
603
- // For multi-select, remove required from base input when there are selections
604
- // The generated inputs handle the form submission with actual values
605
- // Restore required attribute when there are no selections (if it was originally required)
606
- if (this.selectedOptions.size > 0) {
607
- baseInput.value = "";
608
- baseInput.removeAttribute("required");
609
- } else {
610
- baseInput.value = "";
611
- if (this.wasOriginallyRequired) {
612
- baseInput.setAttribute("required", "");
613
- }
614
- }
596
+ baseInput.value = "";
615
597
  }
616
598
 
617
599
  handleBackspaceClear() {
@@ -119,22 +119,21 @@ const Table = (props: TableProps): React.ReactElement => {
119
119
  header.classList.add('sticky-left-shadow');
120
120
  }
121
121
 
122
- const headerWidth = (header as HTMLElement).offsetWidth;
123
- accumulatedWidth += headerWidth;
122
+ accumulatedWidth += (header as HTMLElement).offsetWidth;
123
+ }
124
124
 
125
- cells.forEach((cell) => {
126
- cell.classList.add('sticky');
127
- (cell as HTMLElement).style.left = `${accumulatedWidth - headerWidth}px`;
125
+ cells.forEach((cell) => {
126
+ cell.classList.add('sticky');
127
+ (cell as HTMLElement).style.left = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
128
128
 
129
- if (!isLastColumn) {
130
- cell.classList.add('with-border-right');
131
- cell.classList.remove('sticky-left-shadow');
132
- } else {
133
- cell.classList.remove('with-border-right');
134
- cell.classList.add('sticky-left-shadow');
135
- }
136
- });
137
- }
129
+ if (!isLastColumn) {
130
+ cell.classList.add('with-border-right');
131
+ cell.classList.remove('sticky-left-shadow');
132
+ } else {
133
+ cell.classList.remove('with-border-right');
134
+ cell.classList.add('sticky-left-shadow');
135
+ }
136
+ });
138
137
  });
139
138
  };
140
139
 
@@ -171,22 +170,21 @@ const Table = (props: TableProps): React.ReactElement => {
171
170
  header.classList.add('sticky-right-shadow');
172
171
  }
173
172
 
174
- const headerWidth = (header as HTMLElement).offsetWidth;
175
- accumulatedWidth += headerWidth;
173
+ accumulatedWidth += (header as HTMLElement).offsetWidth;
174
+ }
176
175
 
177
- cells.forEach((cell) => {
178
- cell.classList.add('sticky');
179
- (cell as HTMLElement).style.right = `${accumulatedWidth - headerWidth}px`;
176
+ cells.forEach((cell) => {
177
+ cell.classList.add('sticky');
178
+ (cell as HTMLElement).style.right = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
180
179
 
181
- if (!isLastColumn) {
182
- cell.classList.add('with-border-left');
183
- cell.classList.remove('sticky-right-shadow');
184
- } else {
185
- cell.classList.remove('with-border-left');
186
- cell.classList.add('sticky-right-shadow');
187
- }
188
- });
189
- }
180
+ if (!isLastColumn) {
181
+ cell.classList.add('with-border-left');
182
+ cell.classList.remove('sticky-right-shadow');
183
+ } else {
184
+ cell.classList.remove('with-border-left');
185
+ cell.classList.add('sticky-right-shadow');
186
+ }
187
+ });
190
188
  });
191
189
  };
192
190
 
@@ -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}
@@ -213,24 +213,10 @@ 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
- 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()
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(" ")
234
220
  }
235
221
 
236
222
  //reusable function for top, bottom, right and left props
@@ -450,11 +436,9 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
450
436
  if (typeof zIndexEntry[1] == "number") {
451
437
  css += `z_index_${zIndexEntry[1]} `
452
438
  } else if (typeof zIndexEntry[1] == "object") {
453
- const responsiveObj: {[key: string]: string} = {}
454
- Object.entries(zIndexEntry[1]).forEach(([key, value]) => {
455
- responsiveObj[key] = value.toString()
439
+ Object.entries(zIndexEntry[1]).forEach((zIndexObj) => {
440
+ css += `z_index_${zIndexObj[0]}_${zIndexObj[1]} `
456
441
  })
457
- css += getResponsivePropClasses(responsiveObj, 'z_index')
458
442
  } else if (zIndexEntry[1] === 'max') {
459
443
  css += `z_index_max `
460
444
  }
@@ -479,11 +463,9 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
479
463
  if (typeof displayEntry[1] == "string") {
480
464
  css += `display_${displayEntry[1]} `
481
465
  } else if (typeof displayEntry[1] == "object") {
482
- const responsiveObj: {[key: string]: string} = {}
483
- Object.entries(displayEntry[1]).forEach(([key, value]) => {
484
- responsiveObj[key] = typeof value === 'string' ? value : value.toString()
466
+ Object.entries(displayEntry[1]).forEach((displayObj) => {
467
+ css += `display_${displayObj[0]}_${displayObj[1]} `
485
468
  })
486
- css += getResponsivePropClasses(responsiveObj, 'display')
487
469
  } else {
488
470
  ' '
489
471
  }
@@ -35,21 +35,3 @@ 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,21 +34,3 @@ 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,21 +35,3 @@ 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,21 +36,3 @@ 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,21 +62,3 @@ 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,21 +35,3 @@ 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,21 +33,3 @@ 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,21 +33,3 @@ 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,21 +35,3 @@ 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,21 +35,3 @@ 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
- })