@startupjs-ui/dialogs 0.1.12 → 0.1.16
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 +16 -0
- package/README.mdx +7 -11
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @startupjs-ui/dialogs
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @startupjs-ui/dialogs
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.1.12](https://github.com/startupjs/startupjs-ui/compare/v0.1.11...v0.1.12) (2026-01-21)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @startupjs-ui/dialogs
|
package/README.mdx
CHANGED
|
@@ -19,7 +19,7 @@ import './index.mdx.cssx.styl'
|
|
|
19
19
|
|
|
20
20
|
# Dialogs
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Dialogs provide three imperative functions for displaying dialog boxes: `alert`, `confirm`, and `prompt`. Each function is async and returns a Promise that resolves when the user dismisses the dialog.
|
|
23
23
|
|
|
24
24
|
```js
|
|
25
25
|
import { DialogsProvider, alert, confirm, prompt } from 'startupjs-ui'
|
|
@@ -47,9 +47,9 @@ export default function RootLayout () {
|
|
|
47
47
|
|
|
48
48
|
## Alert box
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Displays a message that requires the user's attention. The dialog has a single `OK` button. The returned Promise resolves once the user clicks `OK`.
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
You can pass either a plain string or an options object with `title` and `message`.
|
|
53
53
|
|
|
54
54
|
```js
|
|
55
55
|
await alert(message | { title?, message })
|
|
@@ -67,11 +67,9 @@ return pug`
|
|
|
67
67
|
|
|
68
68
|
## Confirm box
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Asks the user to confirm or cancel an action. The dialog shows `Cancel` and `OK` buttons. Returns `true` if the user clicks `OK`, or `false` if they click `Cancel`.
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
If the user clicks `OK`, the function returns `true`. If the user clicks `Cancel`, the function returns `false`.
|
|
72
|
+
You can pass either a plain string or an options object with `title` and `message`.
|
|
75
73
|
|
|
76
74
|
```js
|
|
77
75
|
const result = await confirm(message | { title?, message })
|
|
@@ -95,11 +93,9 @@ return pug`
|
|
|
95
93
|
|
|
96
94
|
## Prompt box
|
|
97
95
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
When a prompt box pops up, the user will have to click either `Cancel` or enter an input value and click `OK` to proceed.
|
|
96
|
+
Asks the user to enter a text value. The dialog shows a text input along with `Cancel` and `OK` buttons. Returns the entered string if the user clicks `OK`, or `null` if they click `Cancel`.
|
|
101
97
|
|
|
102
|
-
|
|
98
|
+
You can pass either a plain string or an options object with `title`, `message`, and `defaultValue`. An optional second argument sets the default input value.
|
|
103
99
|
|
|
104
100
|
```js
|
|
105
101
|
const result = await prompt(message | { title?, message, defaultValue? }, defaultValue?)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/dialogs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
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.
|
|
18
|
+
"@startupjs-ui/br": "^0.1.16",
|
|
19
19
|
"@startupjs-ui/core": "^0.1.11",
|
|
20
|
-
"@startupjs-ui/modal": "^0.1.
|
|
21
|
-
"@startupjs-ui/span": "^0.1.
|
|
22
|
-
"@startupjs-ui/text-input": "^0.1.
|
|
20
|
+
"@startupjs-ui/modal": "^0.1.16",
|
|
21
|
+
"@startupjs-ui/span": "^0.1.16",
|
|
22
|
+
"@startupjs-ui/text-input": "^0.1.16"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "*",
|
|
26
26
|
"react-native": "*",
|
|
27
27
|
"startupjs": "*"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "9943aa3566d5d80f5b404473906eb3c0611f9ee5"
|
|
30
30
|
}
|