@startupjs-ui/dialogs 0.1.13 → 0.1.17

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 (3) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.mdx +7 -11
  3. 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.17](https://github.com/startupjs/startupjs-ui/compare/v0.1.16...v0.1.17) (2026-02-12)
7
+
8
+ **Note:** Version bump only for package @startupjs-ui/dialogs
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
15
+
16
+ **Note:** Version bump only for package @startupjs-ui/dialogs
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
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
- There are three kinds of dialog boxes: `alert`, `confirm` and `prompt`.
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
- An alert box is used if you want to display a message to the user that requires their attention.
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
- When an alert box pops up, the user will have to click `OK` to proceed.
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
- A confirm box is used if you want to get user's permission for something.
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
- When a confirm box pops up, the user will have to click either `OK` or `Cancel` to proceed.
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
- A prompt box is used if you want the user to input a value to do further actions.
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
- If the user clicks `OK` the function returns the input value. If the user clicks `Cancel` the function returns `null`.
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.13",
3
+ "version": "0.1.17",
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.11",
18
+ "@startupjs-ui/br": "^0.1.16",
19
19
  "@startupjs-ui/core": "^0.1.11",
20
- "@startupjs-ui/modal": "^0.1.13",
21
- "@startupjs-ui/span": "^0.1.13",
22
- "@startupjs-ui/text-input": "^0.1.13"
20
+ "@startupjs-ui/modal": "^0.1.17",
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": "5cfdccf2bdae3873e968289a3e6b938fad02101a"
29
+ "gitHead": "902cb7536d017b53dc268cc54e8e54818279744c"
30
30
  }