@pyreon/elements 0.11.4 → 0.11.6

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 (53) hide show
  1. package/README.md +38 -35
  2. package/lib/index.d.ts +15 -15
  3. package/package.json +24 -24
  4. package/src/Element/component.tsx +14 -14
  5. package/src/Element/constants.ts +25 -25
  6. package/src/Element/index.ts +2 -2
  7. package/src/Element/types.ts +3 -3
  8. package/src/Element/utils.ts +1 -1
  9. package/src/List/component.tsx +7 -7
  10. package/src/List/index.ts +2 -2
  11. package/src/Overlay/component.tsx +22 -22
  12. package/src/Overlay/context.tsx +2 -2
  13. package/src/Overlay/index.ts +3 -3
  14. package/src/Overlay/useOverlay.tsx +97 -97
  15. package/src/Portal/component.tsx +6 -6
  16. package/src/Portal/index.ts +2 -2
  17. package/src/Text/component.tsx +6 -6
  18. package/src/Text/index.ts +2 -2
  19. package/src/Text/styled.ts +4 -4
  20. package/src/Util/component.tsx +5 -5
  21. package/src/Util/index.ts +2 -2
  22. package/src/__tests__/Content.test.tsx +46 -46
  23. package/src/__tests__/Element.test.ts +251 -251
  24. package/src/__tests__/Iterator.test.ts +142 -142
  25. package/src/__tests__/List.test.ts +61 -61
  26. package/src/__tests__/Overlay.test.ts +125 -125
  27. package/src/__tests__/Portal.test.ts +33 -33
  28. package/src/__tests__/Text.test.ts +128 -128
  29. package/src/__tests__/Util.test.ts +31 -31
  30. package/src/__tests__/Wrapper.test.tsx +60 -60
  31. package/src/__tests__/equalBeforeAfter.test.ts +41 -41
  32. package/src/__tests__/helpers.test.ts +29 -29
  33. package/src/__tests__/overlayContext.test.tsx +14 -14
  34. package/src/__tests__/responsiveProps.test.ts +116 -116
  35. package/src/__tests__/useOverlay.test.ts +283 -283
  36. package/src/__tests__/utils.test.ts +43 -43
  37. package/src/constants.ts +1 -1
  38. package/src/helpers/Content/component.tsx +5 -5
  39. package/src/helpers/Content/index.ts +1 -1
  40. package/src/helpers/Content/styled.ts +16 -16
  41. package/src/helpers/Content/types.ts +7 -7
  42. package/src/helpers/Iterator/component.tsx +28 -28
  43. package/src/helpers/Iterator/index.ts +2 -2
  44. package/src/helpers/Iterator/types.ts +3 -3
  45. package/src/helpers/Wrapper/component.tsx +6 -6
  46. package/src/helpers/Wrapper/index.ts +1 -1
  47. package/src/helpers/Wrapper/styled.ts +8 -8
  48. package/src/helpers/Wrapper/types.ts +3 -3
  49. package/src/helpers/Wrapper/utils.ts +1 -1
  50. package/src/helpers/index.ts +2 -2
  51. package/src/index.ts +16 -16
  52. package/src/types.ts +7 -7
  53. package/src/utils.ts +1 -1
@@ -1,110 +1,110 @@
1
- import type { VNode } from "@pyreon/core"
2
- import { describe, expect, it, vi } from "vitest"
1
+ import type { VNode } from '@pyreon/core'
2
+ import { describe, expect, it, vi } from 'vitest'
3
3
 
4
4
  // ---------------------------------------------------------------------------
5
5
  // Mocks
6
6
  // ---------------------------------------------------------------------------
7
- vi.mock("~/utils", () => ({
7
+ vi.mock('~/utils', () => ({
8
8
  IS_DEVELOPMENT: true,
9
9
  }))
10
10
 
11
- import Wrapper from "../helpers/Wrapper/component"
12
- import Styled from "../helpers/Wrapper/styled"
11
+ import Wrapper from '../helpers/Wrapper/component'
12
+ import Styled from '../helpers/Wrapper/styled'
13
13
 
14
14
  const asVNode = (v: unknown) => v as VNode
15
15
 
16
- describe("Wrapper component", () => {
17
- describe("normal element (no flex fix needed)", () => {
18
- it("returns a VNode whose type is the Styled component", () => {
19
- const result = asVNode(Wrapper({ tag: "div" }))
16
+ describe('Wrapper component', () => {
17
+ describe('normal element (no flex fix needed)', () => {
18
+ it('returns a VNode whose type is the Styled component', () => {
19
+ const result = asVNode(Wrapper({ tag: 'div' }))
20
20
  expect(result.type).toBe(Styled)
21
21
  })
22
22
 
23
- it("passes normalElement as $element prop with block, direction, alignX, alignY, equalCols, extraStyles", () => {
23
+ it('passes normalElement as $element prop with block, direction, alignX, alignY, equalCols, extraStyles', () => {
24
24
  const result = asVNode(
25
25
  Wrapper({
26
- tag: "div",
26
+ tag: 'div',
27
27
  block: true,
28
- direction: "inline",
29
- alignX: "center",
30
- alignY: "top",
28
+ direction: 'inline',
29
+ alignX: 'center',
30
+ alignY: 'top',
31
31
  equalCols: false,
32
- extendCss: "color: red;",
32
+ extendCss: 'color: red;',
33
33
  }),
34
34
  )
35
35
 
36
36
  expect(result.props.$element).toEqual({
37
37
  block: true,
38
- direction: "inline",
39
- alignX: "center",
40
- alignY: "top",
38
+ direction: 'inline',
39
+ alignX: 'center',
40
+ alignY: 'top',
41
41
  equalCols: false,
42
- extraStyles: "color: red;",
42
+ extraStyles: 'color: red;',
43
43
  })
44
44
  })
45
45
 
46
46
  it("passes tag as the 'as' prop", () => {
47
- const result = asVNode(Wrapper({ tag: "div" }))
48
- expect(result.props.as).toBe("div")
47
+ const result = asVNode(Wrapper({ tag: 'div' }))
48
+ expect(result.props.as).toBe('div')
49
49
  })
50
50
 
51
- it("passes ref through", () => {
51
+ it('passes ref through', () => {
52
52
  const ref = () => {}
53
- const result = asVNode(Wrapper({ tag: "div", ref }))
53
+ const result = asVNode(Wrapper({ tag: 'div', ref }))
54
54
  expect(result.props.ref).toBe(ref)
55
55
  })
56
56
 
57
- it("passes children through", () => {
58
- const result = asVNode(Wrapper({ tag: "div", children: "child content" }))
59
- expect(result.props.children).toBe("child content")
57
+ it('passes children through', () => {
58
+ const result = asVNode(Wrapper({ tag: 'div', children: 'child content' }))
59
+ expect(result.props.children).toBe('child content')
60
60
  })
61
61
 
62
- it("adds data-pyr-element in development mode", () => {
63
- const result = asVNode(Wrapper({ tag: "div" }))
64
- expect(result.props["data-pyr-element"]).toBe("Element")
62
+ it('adds data-pyr-element in development mode', () => {
63
+ const result = asVNode(Wrapper({ tag: 'div' }))
64
+ expect(result.props['data-pyr-element']).toBe('Element')
65
65
  })
66
66
 
67
- it("spreads extra props", () => {
68
- const result = asVNode(Wrapper({ tag: "section", id: "wrapper", role: "main" } as any))
69
- expect(result.props.id).toBe("wrapper")
70
- expect(result.props.role).toBe("main")
67
+ it('spreads extra props', () => {
68
+ const result = asVNode(Wrapper({ tag: 'section', id: 'wrapper', role: 'main' } as any))
69
+ expect(result.props.id).toBe('wrapper')
70
+ expect(result.props.role).toBe('main')
71
71
  })
72
72
  })
73
73
 
74
- describe("flex-fix path (button/fieldset/legend)", () => {
75
- it("renders parent Styled with parentFixElement for button", () => {
76
- const result = asVNode(Wrapper({ tag: "button", children: "Click me" }))
74
+ describe('flex-fix path (button/fieldset/legend)', () => {
75
+ it('renders parent Styled with parentFixElement for button', () => {
76
+ const result = asVNode(Wrapper({ tag: 'button', children: 'Click me' }))
77
77
  expect(result.type).toBe(Styled)
78
78
  expect((result.props.$element as any).parentFix).toBe(true)
79
79
  })
80
80
 
81
- it("parent Styled receives parentFixElement props (block + extraStyles only)", () => {
81
+ it('parent Styled receives parentFixElement props (block + extraStyles only)', () => {
82
82
  const result = asVNode(
83
83
  Wrapper({
84
- tag: "button",
84
+ tag: 'button',
85
85
  block: true,
86
- extendCss: "border: none;",
87
- direction: "inline",
88
- alignX: "center",
89
- alignY: "center",
86
+ extendCss: 'border: none;',
87
+ direction: 'inline',
88
+ alignX: 'center',
89
+ alignY: 'center',
90
90
  }),
91
91
  )
92
92
 
93
93
  expect(result.props.$element).toEqual({
94
94
  parentFix: true,
95
95
  block: true,
96
- extraStyles: "border: none;",
96
+ extraStyles: 'border: none;',
97
97
  })
98
- expect(result.props.as).toBe("button")
98
+ expect(result.props.as).toBe('button')
99
99
  })
100
100
 
101
- it("child Styled receives childFixElement props (direction, alignX, alignY, equalCols)", () => {
101
+ it('child Styled receives childFixElement props (direction, alignX, alignY, equalCols)', () => {
102
102
  const result = asVNode(
103
103
  Wrapper({
104
- tag: "fieldset",
105
- direction: "rows",
106
- alignX: "left",
107
- alignY: "bottom",
104
+ tag: 'fieldset',
105
+ direction: 'rows',
106
+ alignX: 'left',
107
+ alignY: 'bottom',
108
108
  equalCols: true,
109
109
  }),
110
110
  )
@@ -115,32 +115,32 @@ describe("Wrapper component", () => {
115
115
  expect(child.props.$childFix).toBe(true)
116
116
  expect(child.props.$element).toEqual({
117
117
  childFix: true,
118
- direction: "rows",
119
- alignX: "left",
120
- alignY: "bottom",
118
+ direction: 'rows',
119
+ alignX: 'left',
120
+ alignY: 'bottom',
121
121
  equalCols: true,
122
122
  })
123
123
  })
124
124
 
125
125
  it("uses 'div' as inner tag by default", () => {
126
- const result = asVNode(Wrapper({ tag: "button" }))
126
+ const result = asVNode(Wrapper({ tag: 'button' }))
127
127
  const child = asVNode(result.props.children)
128
- expect(child.props.as).toBe("div")
128
+ expect(child.props.as).toBe('div')
129
129
  })
130
130
 
131
131
  it("uses 'span' as inner tag when isInline is true", () => {
132
- const result = asVNode(Wrapper({ tag: "button", isInline: true }))
132
+ const result = asVNode(Wrapper({ tag: 'button', isInline: true }))
133
133
  const child = asVNode(result.props.children)
134
- expect(child.props.as).toBe("span")
134
+ expect(child.props.as).toBe('span')
135
135
  })
136
136
  })
137
137
 
138
- describe("dangerouslySetInnerHTML skips fix", () => {
139
- it("renders single Styled without parentFix for button when dangerouslySetInnerHTML is set", () => {
138
+ describe('dangerouslySetInnerHTML skips fix', () => {
139
+ it('renders single Styled without parentFix for button when dangerouslySetInnerHTML is set', () => {
140
140
  const result = asVNode(
141
141
  Wrapper({
142
- tag: "button",
143
- dangerouslySetInnerHTML: { __html: "<b>Bold</b>" },
142
+ tag: 'button',
143
+ dangerouslySetInnerHTML: { __html: '<b>Bold</b>' },
144
144
  } as any),
145
145
  )
146
146
 
@@ -1,9 +1,9 @@
1
- import type { VNode } from "@pyreon/core"
2
- import { h } from "@pyreon/core"
3
- import { describe, expect, it } from "vitest"
4
- import { Element } from "../Element"
5
- import Content from "../helpers/Content/component"
6
- import Wrapper from "../helpers/Wrapper/component"
1
+ import type { VNode } from '@pyreon/core'
2
+ import { h } from '@pyreon/core'
3
+ import { describe, expect, it } from 'vitest'
4
+ import { Element } from '../Element'
5
+ import Content from '../helpers/Content/component'
6
+ import Wrapper from '../helpers/Wrapper/component'
7
7
 
8
8
  const asVNode = (v: unknown) => v as VNode
9
9
 
@@ -12,67 +12,67 @@ const getContentSlots = (result: VNode): VNode[] => {
12
12
  if (!Array.isArray(children)) return []
13
13
  return children.filter(
14
14
  (c: unknown) =>
15
- c != null && typeof c === "object" && "type" in (c as VNode) && (c as VNode).type === Content,
15
+ c != null && typeof c === 'object' && 'type' in (c as VNode) && (c as VNode).type === Content,
16
16
  ) as VNode[]
17
17
  }
18
18
 
19
- describe("Element equalBeforeAfter", () => {
20
- it("always passes a ref function to Wrapper", () => {
19
+ describe('Element equalBeforeAfter', () => {
20
+ it('always passes a ref function to Wrapper', () => {
21
21
  const result = asVNode(
22
22
  Element({
23
23
  equalBeforeAfter: true,
24
- direction: "inline",
25
- beforeContent: h("span", null, "Before"),
26
- afterContent: h("span", null, "After"),
27
- children: "Main",
24
+ direction: 'inline',
25
+ beforeContent: h('span', null, 'Before'),
26
+ afterContent: h('span', null, 'After'),
27
+ children: 'Main',
28
28
  }),
29
29
  )
30
30
  expect(result.type).toBe(Wrapper)
31
- expect(typeof result.props.ref).toBe("function")
31
+ expect(typeof result.props.ref).toBe('function')
32
32
  })
33
33
 
34
- it("does not crash without before/after content", () => {
35
- const result = asVNode(Element({ equalBeforeAfter: true, children: "Main only" }))
34
+ it('does not crash without before/after content', () => {
35
+ const result = asVNode(Element({ equalBeforeAfter: true, children: 'Main only' }))
36
36
  expect(result.type).toBe(Wrapper)
37
37
  })
38
38
 
39
- it("does not crash with only beforeContent", () => {
39
+ it('does not crash with only beforeContent', () => {
40
40
  const result = asVNode(
41
41
  Element({
42
42
  equalBeforeAfter: true,
43
- beforeContent: h("span", null, "Before"),
44
- children: "Main",
43
+ beforeContent: h('span', null, 'Before'),
44
+ children: 'Main',
45
45
  }),
46
46
  )
47
47
  expect(result.type).toBe(Wrapper)
48
48
  })
49
49
 
50
- it("does not crash with only afterContent", () => {
50
+ it('does not crash with only afterContent', () => {
51
51
  const result = asVNode(
52
52
  Element({
53
53
  equalBeforeAfter: true,
54
- afterContent: h("span", null, "After"),
55
- children: "Main",
54
+ afterContent: h('span', null, 'After'),
55
+ children: 'Main',
56
56
  }),
57
57
  )
58
58
  expect(result.type).toBe(Wrapper)
59
59
  })
60
60
 
61
- it("renders three slot children when both before and after exist", () => {
61
+ it('renders three slot children when both before and after exist', () => {
62
62
  const result = asVNode(
63
63
  Element({
64
64
  equalBeforeAfter: true,
65
- direction: "inline",
66
- beforeContent: h("span", null, "Short"),
67
- afterContent: h("span", null, "Longer content"),
68
- children: "Center",
65
+ direction: 'inline',
66
+ beforeContent: h('span', null, 'Short'),
67
+ afterContent: h('span', null, 'Longer content'),
68
+ children: 'Center',
69
69
  }),
70
70
  )
71
71
  const slots = getContentSlots(result)
72
72
  expect(slots).toHaveLength(3)
73
73
  })
74
74
 
75
- it("merged ref calls external function ref", () => {
75
+ it('merged ref calls external function ref', () => {
76
76
  let captured: HTMLElement | null = null
77
77
  const ref = (node: HTMLElement | null) => {
78
78
  captured = node
@@ -81,9 +81,9 @@ describe("Element equalBeforeAfter", () => {
81
81
  Element({
82
82
  equalBeforeAfter: true,
83
83
  ref,
84
- beforeContent: h("span", null, "Before"),
85
- afterContent: h("span", null, "After"),
86
- children: "Main",
84
+ beforeContent: h('span', null, 'Before'),
85
+ afterContent: h('span', null, 'After'),
86
+ children: 'Main',
87
87
  }),
88
88
  )
89
89
  const fakeNode = {} as HTMLElement
@@ -91,15 +91,15 @@ describe("Element equalBeforeAfter", () => {
91
91
  expect(captured).toBe(fakeNode)
92
92
  })
93
93
 
94
- it("merged ref sets object ref current", () => {
94
+ it('merged ref sets object ref current', () => {
95
95
  const ref = { current: null as HTMLElement | null }
96
96
  const result = asVNode(
97
97
  Element({
98
98
  equalBeforeAfter: true,
99
99
  ref,
100
- beforeContent: h("span", null, "Before"),
101
- afterContent: h("span", null, "After"),
102
- children: "Main",
100
+ beforeContent: h('span', null, 'Before'),
101
+ afterContent: h('span', null, 'After'),
102
+ children: 'Main',
103
103
  }),
104
104
  )
105
105
  const fakeNode = {} as HTMLElement
@@ -107,16 +107,16 @@ describe("Element equalBeforeAfter", () => {
107
107
  expect(ref.current).toBe(fakeNode)
108
108
  })
109
109
 
110
- it("uses inline direction for equalBeforeAfter", () => {
110
+ it('uses inline direction for equalBeforeAfter', () => {
111
111
  const result = asVNode(
112
112
  Element({
113
113
  equalBeforeAfter: true,
114
- direction: "inline",
115
- beforeContent: h("span", null, "B"),
116
- afterContent: h("span", null, "A"),
117
- children: "Main",
114
+ direction: 'inline',
115
+ beforeContent: h('span', null, 'B'),
116
+ afterContent: h('span', null, 'A'),
117
+ children: 'Main',
118
118
  }),
119
119
  )
120
- expect(result.props.direction).toBe("inline")
120
+ expect(result.props.direction).toBe('inline')
121
121
  })
122
122
  })
@@ -1,64 +1,64 @@
1
- import { describe, expect, it } from "vitest"
2
- import { INLINE_ELEMENTS_FLEX_FIX } from "../helpers/Wrapper/constants"
3
- import { isWebFixNeeded } from "../helpers/Wrapper/utils"
1
+ import { describe, expect, it } from 'vitest'
2
+ import { INLINE_ELEMENTS_FLEX_FIX } from '../helpers/Wrapper/constants'
3
+ import { isWebFixNeeded } from '../helpers/Wrapper/utils'
4
4
 
5
- describe("Wrapper utils", () => {
6
- describe("isWebFixNeeded", () => {
7
- it("returns true for button", () => {
8
- expect(isWebFixNeeded("button")).toBe(true)
5
+ describe('Wrapper utils', () => {
6
+ describe('isWebFixNeeded', () => {
7
+ it('returns true for button', () => {
8
+ expect(isWebFixNeeded('button')).toBe(true)
9
9
  })
10
10
 
11
- it("returns true for fieldset", () => {
12
- expect(isWebFixNeeded("fieldset")).toBe(true)
11
+ it('returns true for fieldset', () => {
12
+ expect(isWebFixNeeded('fieldset')).toBe(true)
13
13
  })
14
14
 
15
- it("returns true for legend", () => {
16
- expect(isWebFixNeeded("legend")).toBe(true)
15
+ it('returns true for legend', () => {
16
+ expect(isWebFixNeeded('legend')).toBe(true)
17
17
  })
18
18
 
19
- it("returns false for div", () => {
20
- expect(isWebFixNeeded("div")).toBe(false)
19
+ it('returns false for div', () => {
20
+ expect(isWebFixNeeded('div')).toBe(false)
21
21
  })
22
22
 
23
- it("returns false for span", () => {
24
- expect(isWebFixNeeded("span")).toBe(false)
23
+ it('returns false for span', () => {
24
+ expect(isWebFixNeeded('span')).toBe(false)
25
25
  })
26
26
 
27
- it("returns false for section", () => {
28
- expect(isWebFixNeeded("section")).toBe(false)
27
+ it('returns false for section', () => {
28
+ expect(isWebFixNeeded('section')).toBe(false)
29
29
  })
30
30
 
31
- it("returns false for undefined", () => {
31
+ it('returns false for undefined', () => {
32
32
  expect(isWebFixNeeded(undefined)).toBe(false)
33
33
  })
34
34
 
35
- it("returns false for empty string", () => {
36
- expect(isWebFixNeeded("")).toBe(false)
35
+ it('returns false for empty string', () => {
36
+ expect(isWebFixNeeded('')).toBe(false)
37
37
  })
38
38
 
39
- it("returns false for input", () => {
40
- expect(isWebFixNeeded("input")).toBe(false)
39
+ it('returns false for input', () => {
40
+ expect(isWebFixNeeded('input')).toBe(false)
41
41
  })
42
42
 
43
- it("returns false for form", () => {
44
- expect(isWebFixNeeded("form")).toBe(false)
43
+ it('returns false for form', () => {
44
+ expect(isWebFixNeeded('form')).toBe(false)
45
45
  })
46
46
  })
47
47
 
48
- describe("INLINE_ELEMENTS_FLEX_FIX", () => {
49
- it("contains button", () => {
48
+ describe('INLINE_ELEMENTS_FLEX_FIX', () => {
49
+ it('contains button', () => {
50
50
  expect(INLINE_ELEMENTS_FLEX_FIX.button).toBe(true)
51
51
  })
52
52
 
53
- it("contains fieldset", () => {
53
+ it('contains fieldset', () => {
54
54
  expect(INLINE_ELEMENTS_FLEX_FIX.fieldset).toBe(true)
55
55
  })
56
56
 
57
- it("contains legend", () => {
57
+ it('contains legend', () => {
58
58
  expect(INLINE_ELEMENTS_FLEX_FIX.legend).toBe(true)
59
59
  })
60
60
 
61
- it("only has 3 entries", () => {
61
+ it('only has 3 entries', () => {
62
62
  expect(Object.keys(INLINE_ELEMENTS_FLEX_FIX)).toHaveLength(3)
63
63
  })
64
64
  })
@@ -1,19 +1,19 @@
1
- import { popContext } from "@pyreon/core"
2
- import { afterEach, describe, expect, it, vi } from "vitest"
3
- import OverlayContextProvider, { useOverlayContext } from "../Overlay/context"
1
+ import { popContext } from '@pyreon/core'
2
+ import { afterEach, describe, expect, it, vi } from 'vitest'
3
+ import OverlayContextProvider, { useOverlayContext } from '../Overlay/context'
4
4
 
5
- describe("Overlay context", () => {
6
- it("useOverlayContext is a function", () => {
7
- expect(typeof useOverlayContext).toBe("function")
5
+ describe('Overlay context', () => {
6
+ it('useOverlayContext is a function', () => {
7
+ expect(typeof useOverlayContext).toBe('function')
8
8
  })
9
9
 
10
- it("returns the default context (empty object) when called outside a provider", () => {
10
+ it('returns the default context (empty object) when called outside a provider', () => {
11
11
  const ctx = useOverlayContext()
12
12
  expect(ctx).toEqual({})
13
13
  })
14
14
  })
15
15
 
16
- describe("OverlayContextProvider component", () => {
16
+ describe('OverlayContextProvider component', () => {
17
17
  afterEach(() => {
18
18
  try {
19
19
  popContext()
@@ -22,7 +22,7 @@ describe("OverlayContextProvider component", () => {
22
22
  }
23
23
  })
24
24
 
25
- it("provides blocked/setBlocked/setUnblocked via context", () => {
25
+ it('provides blocked/setBlocked/setUnblocked via context', () => {
26
26
  const setBlocked = vi.fn()
27
27
  const setUnblocked = vi.fn()
28
28
 
@@ -30,7 +30,7 @@ describe("OverlayContextProvider component", () => {
30
30
  blocked: true,
31
31
  setBlocked,
32
32
  setUnblocked,
33
- children: "child",
33
+ children: 'child',
34
34
  })
35
35
 
36
36
  const ctx = useOverlayContext()
@@ -39,18 +39,18 @@ describe("OverlayContextProvider component", () => {
39
39
  expect(ctx.setUnblocked).toBe(setUnblocked)
40
40
  })
41
41
 
42
- it("renders children (returns a value)", () => {
42
+ it('renders children (returns a value)', () => {
43
43
  const result = OverlayContextProvider({
44
44
  blocked: false,
45
45
  setBlocked: vi.fn(),
46
46
  setUnblocked: vi.fn(),
47
- children: "Hello overlay",
47
+ children: 'Hello overlay',
48
48
  })
49
49
 
50
50
  expect(result).toBeDefined()
51
51
  })
52
52
 
53
- it("provides blocked as false", () => {
53
+ it('provides blocked as false', () => {
54
54
  OverlayContextProvider({
55
55
  blocked: false,
56
56
  setBlocked: vi.fn(),
@@ -62,7 +62,7 @@ describe("OverlayContextProvider component", () => {
62
62
  expect(ctx.blocked).toBe(false)
63
63
  })
64
64
 
65
- it("provides blocked as a function when passed as a function", () => {
65
+ it('provides blocked as a function when passed as a function', () => {
66
66
  const blockedFn = () => true
67
67
 
68
68
  OverlayContextProvider({