@startupjs-ui/dialogs 0.1.22 → 0.2.0-alpha.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.2.0-alpha.0](https://github.com/startupjs/startupjs-ui/compare/v0.1.22...v0.2.0-alpha.0) (2026-03-27)
7
+
8
+
9
+ ### Features
10
+
11
+ * fix and improve accessibility of various components. Add storybook with tests. ([#21](https://github.com/startupjs/startupjs-ui/issues/21)) ([83b6576](https://github.com/startupjs/startupjs-ui/commit/83b65767ed61b24209f71b143ba1c2986170ab58))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.1.22](https://github.com/startupjs/startupjs-ui/compare/v0.1.21...v0.1.22) (2026-03-25)
7
18
 
8
19
  **Note:** Version bump only for package @startupjs-ui/dialogs
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useState, type ReactNode } from 'react'
2
2
  import { pug, observer } from 'startupjs'
3
3
  import Modal from '@startupjs-ui/modal'
4
- import { setUpdateDialogState } from './helpers'
4
+ import { setUpdateDialogState, updateDialogState } from './helpers'
5
5
 
6
6
  export const _PropsJsonSchema = {/* DialogsProviderProps */}
7
7
 
@@ -11,14 +11,14 @@ export interface DialogsProviderProps {}
11
11
  function DialogsProviderRoot (): ReactNode {
12
12
  const [dialog = {}, setDialog] = useState<any>()
13
13
 
14
- // used by alert/confirm/prompt to show a dialog
15
- setUpdateDialogState(setDialog)
16
-
17
14
  useEffect(() => {
15
+ // Keep the latest mounted provider registered across route remounts.
16
+ setUpdateDialogState(setDialog)
17
+
18
18
  return () => {
19
- setUpdateDialogState(undefined)
19
+ if (updateDialogState === setDialog) setUpdateDialogState(undefined)
20
20
  }
21
- }, [])
21
+ }, [setDialog])
22
22
 
23
23
  return pug`
24
24
  if dialog.visible
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/dialogs",
3
- "version": "0.1.22",
3
+ "version": "0.2.0-alpha.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -15,16 +15,16 @@
15
15
  "./prompt": "./prompt.tsx"
16
16
  },
17
17
  "dependencies": {
18
- "@startupjs-ui/br": "^0.1.22",
19
- "@startupjs-ui/core": "^0.1.22",
20
- "@startupjs-ui/modal": "^0.1.22",
21
- "@startupjs-ui/span": "^0.1.22",
22
- "@startupjs-ui/text-input": "^0.1.22"
18
+ "@startupjs-ui/br": "^0.2.0-alpha.0",
19
+ "@startupjs-ui/core": "^0.2.0-alpha.0",
20
+ "@startupjs-ui/modal": "^0.2.0-alpha.0",
21
+ "@startupjs-ui/span": "^0.2.0-alpha.0",
22
+ "@startupjs-ui/text-input": "^0.2.0-alpha.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": "*",
26
26
  "react-native": "*",
27
27
  "startupjs": "*"
28
28
  },
29
- "gitHead": "3bd18c16f0f203ee3d940bf2e09381edc0034665"
29
+ "gitHead": "a428246a18d0e7f77809043c8240253240d11d66"
30
30
  }