@loadsmart/loadsmart-ui 6.4.0 → 7.0.1

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.
@@ -17,7 +17,6 @@ export interface TableProps<T extends Selectable = TableSelectableRow>
17
17
  extends HTMLAttributes<HTMLTableElement> {
18
18
  scale?: Scale
19
19
  selection?: TableSelectionConfig<T>
20
- withExpandableRows?: boolean
21
20
  }
22
21
 
23
22
  export interface TableCaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
@@ -57,10 +56,6 @@ export interface TableCellProps extends HTMLAttributes<HTMLTableCellElement> {
57
56
  selected?: boolean
58
57
  }
59
58
 
60
- export interface TableHeadCellProps extends TableCellProps {
61
- capitalized?: boolean
62
- }
63
-
64
59
  export type TableColumn<T = Record<string, unknown>> = {
65
60
  /**
66
61
  * The accessor of you entry interface
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable */
2
- import { act, queries, fireEvent, waitForElementToBeRemoved } from '@testing-library/react'
3
-
2
+ import { act, queries, fireEvent, waitFor, waitForElementToBeRemoved } from '@testing-library/react'
4
3
  // find the date picker container from its input field 🤷
5
4
  function getContainerFromInput(input: HTMLElement): HTMLElement {
6
5
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -20,10 +19,10 @@ async function expand(input: HTMLElement): Promise<void> {
20
19
  return
21
20
  }
22
21
 
23
- await act(async () => {
24
- fireEvent.click(input)
22
+ fireEvent.click(input)
25
23
 
26
- expect(await queries.findByRole(datePickerContainer, 'menu')).toBeInTheDocument()
24
+ await waitFor(() => {
25
+ expect(queries.getByRole(datePickerContainer, 'menu')).toBeInTheDocument()
27
26
  })
28
27
  }
29
28
 
@@ -40,10 +39,10 @@ async function collapse(input: HTMLElement): Promise<void> {
40
39
  return
41
40
  }
42
41
 
43
- await act(async () => {
44
- fireEvent.click(queries.getByText(datePickerContainer, 'Close'))
42
+ fireEvent.click(queries.getByText(datePickerContainer, 'Close'))
45
43
 
46
- await waitForElementToBeRemoved(() => queries.queryByRole(datePickerContainer, 'menu'))
44
+ await waitFor(() => {
45
+ expect(queries.queryByRole(datePickerContainer, 'menu')).not.toBeInTheDocument()
47
46
  })
48
47
  }
49
48
 
@@ -59,15 +58,15 @@ async function pick(day: string, input: HTMLElement): Promise<void> {
59
58
 
60
59
  await expand(input)
61
60
 
62
- await act(async () => {
61
+ act(() => {
63
62
  input.focus()
63
+ })
64
64
 
65
- const dayElement = queries.getByLabelText(datePickerContainer, day)
65
+ const dayElement = queries.getByLabelText(datePickerContainer, day)
66
66
 
67
- if (dayElement && dayElement.getAttribute('aria-checked') == 'false') {
68
- fireEvent.click(dayElement)
69
- }
70
- })
67
+ if (dayElement && dayElement.getAttribute('aria-checked') == 'false') {
68
+ fireEvent.click(dayElement)
69
+ }
71
70
 
72
71
  await collapse(input)
73
72
  }
@@ -80,11 +79,9 @@ async function pick(day: string, input: HTMLElement): Promise<void> {
80
79
  async function clear(input: HTMLElement): Promise<void> {
81
80
  const datePickerContainer = getContainerFromInput(input)
82
81
 
83
- await act(async () => {
84
- const clearButton = queries.getByLabelText(datePickerContainer, 'Clear selection')
82
+ const clearButton = queries.getByLabelText(datePickerContainer, 'Clear selection')
85
83
 
86
- fireEvent.click(clearButton)
87
- })
84
+ fireEvent.click(clearButton)
88
85
 
89
86
  await collapse(input)
90
87
  }
@@ -89,8 +89,8 @@ async function expand(input: HTMLElement): Promise<void> {
89
89
  input.dispatchEvent(new MouseEvent('click', { bubbles: true }))
90
90
  })
91
91
 
92
- await waitFor(async () => {
93
- expect(await within(getSelectContainer(input)).findByRole('listbox')).toBeInTheDocument()
92
+ await waitFor(() => {
93
+ expect(within(getSelectContainer(input)).getByRole('listbox')).toBeInTheDocument()
94
94
  })
95
95
  }
96
96
 
@@ -872,7 +872,7 @@ const mirandaCompatibility = {
872
872
  // Table
873
873
  'table-row-default-color': color('neutral-white'),
874
874
  'table-row-variant-color': toCSSValue('color-neutral-40', 0.2),
875
- 'table-row-selected-color': toCSSValue('color-primary-60', 0.2),
875
+ 'table-row-selected-color': toCSSValue('color-primary-20'),
876
876
 
877
877
  // Top Navigation
878
878
  'top-navigation-height': rem('60px'),
@@ -1,2 +0,0 @@
1
- "use strict";var t=require("./toArray-b56541b4.js"),n=require("./miranda-compatibility.theme-22a9ce26.js"),e=require("./theming/index.js");function r(t,r){return Object.keys(t||{}).reduce(((o,i)=>{var u;let s=t[i];if(n.isFunction(s)&&(s=s(r)),s){const t=i,n=null!==(u=e.getToken(t,r))&&void 0!==u?u:i;return[...o,n]}return o}),[]).join(" ")}function o(...t){const[n,e]=t;return null==n||!1===n||Number.isNaN(n)?e||n:"string"==typeof n&&0===n.length&&e||n}exports.conditional=function(...e){return function(o){let i=[];for(let u=0;u<e.length;u++){const s=e[u];n.isFunction(s)?i.push(s(o)):t.isObject(s)?i=i.concat(r(s,o)):s&&i.push(String(s))}return i.join(" ")}},exports.prop=function(t,n,e=o){return r=>e(r[t],n)},exports.whenProps=function(e){return function(r){const o=t.toArray(e);let i=!1;for(let e=0;e<o.length;e++){const u=o[e],s=Object.keys(u);let c=!0;for(let e=0;e<s.length&&c;e++){const o=s[e],i=n.lodash_get(r,o),l=u[o];c=Array.isArray(l)?c&&t.toArray(l).includes(i):n.isFunction(l)?c&&Boolean(l(i)):c&&l===i}i=i||c}return i}};
2
- //# sourceMappingURL=prop-201ffe28.js.map