@northlight/ui 2.41.1 → 2.42.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@northlight/ui",
3
- "version": "2.41.1",
3
+ "version": "2.42.1",
4
4
  "description": "Northlight UI library, based on Chakra-ui",
5
5
  "license": "MIT",
6
6
  "author": "Camphouse",
@@ -66,6 +66,9 @@
66
66
  "@react-stately/checkbox": "^3.5.0",
67
67
  "@react-stately/datepicker": "^3.7.0",
68
68
  "@react-stately/radio": "^3.9.0",
69
+ "@testing-library/dom": "^10.0.0",
70
+ "@testing-library/react": "^16.0.0",
71
+ "@testing-library/user-event": "^14.4.3",
69
72
  "@types/mocha": "^10.0.1",
70
73
  "@types/ramda": "^0.28.15",
71
74
  "@types/react-avatar-editor": "^13.0.0",
@@ -92,8 +95,6 @@
92
95
  },
93
96
  "devDependencies": {
94
97
  "@mediatool/frontend-tools": "^1.2.2",
95
- "@testing-library/react": "^14.0.0",
96
- "@testing-library/user-event": "^14.4.3",
97
98
  "@types/chai": "^4.3.4",
98
99
  "@types/react": "^18.0.28",
99
100
  "@types/react-dom": "^18.0.11",
@@ -119,5 +120,5 @@
119
120
  "react-dom": ">=18.0.0",
120
121
  "react-router-dom": "^5.0.0"
121
122
  },
122
- "gitHead": "98deec7d88787e4b57e82f38273d460f5708062a"
123
+ "gitHead": "73b0db153ace4368380c4ba565da085fe1f1ec99"
123
124
  }
@@ -64,7 +64,7 @@ async function main () {
64
64
  return `
65
65
  import { createElement } from 'react'
66
66
  import { createRoot } from 'react-dom/client'
67
- import { SandboxViewer } from '${sandboxPackageDir}/lib/viewer/sandbox-viewer.tsx'
67
+ import { SandboxViewer } from '@northlight/ui/sandbox'
68
68
  import { scenarios } from '${absoluteScenariosPath}'
69
69
 
70
70
  const root = document.getElementById('root')
@@ -3,9 +3,7 @@ import type userEvent from '@testing-library/user-event'
3
3
  import type { ComponentType } from 'react'
4
4
 
5
5
  type PlayContext = {
6
- /** Queries scoped to the scenario container - use for non-portaled content */
7
6
  screen: ReturnType<typeof within>
8
- /** Queries scoped to document.body - use for portaled content (dropdowns, modals) */
9
7
  documentScreen: typeof screen
10
8
  user: ReturnType<typeof userEvent.setup>
11
9
  container: HTMLElement
@@ -17,12 +15,14 @@ type Scenario<P> =
17
15
  props: P
18
16
  component?: undefined
19
17
  play?: (context: PlayContext) => Promise<void>
18
+ code?: string
20
19
  }
21
20
  | {
22
21
  name: string
23
22
  props: Record<string, unknown>
24
23
  component: ComponentType<any>
25
24
  play?: (context: PlayContext) => Promise<void>
25
+ code?: string
26
26
  }
27
27
 
28
28
  type ComponentScenarios<P = any> = {
@@ -30,6 +30,7 @@ type ComponentScenarios<P = any> = {
30
30
  component: ComponentType<P>
31
31
  scenarios: Scenario<P>[]
32
32
  inline?: boolean
33
+ layout?: 'stacked' | 'tabbed'
33
34
  }
34
35
 
35
36
  export type { PlayContext, Scenario, ComponentScenarios }