@startupjs-ui/modal 0.2.0-alpha.0 → 0.2.0-alpha.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/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.1](https://github.com/startupjs/startupjs-ui/compare/v0.2.0-alpha.0...v0.2.0-alpha.1) (2026-04-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **dialogs:** use 'alertdialog' role for confirm(), prompt(), alert() ([ae2989f](https://github.com/startupjs/startupjs-ui/commit/ae2989fd6cf7b19a189330b3a180226727efc3fe))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.2.0-alpha.0](https://github.com/startupjs/startupjs-ui/compare/v0.1.22...v0.2.0-alpha.0) (2026-03-27)
7
18
 
8
19
 
package/README.mdx CHANGED
@@ -160,6 +160,7 @@ The modal can automatically display action buttons at the bottom:
160
160
  | `$visible` | `any` | | Scoped model for two-way visibility binding |
161
161
  | `ref` | `RefObject` | | Imperative ref exposing `open()` and `close()` |
162
162
  | `title` | `string` | | Header title text |
163
+ | `role` | `string` | `'dialog'` | Accessible role for the modal surface on web |
163
164
  | `cancelLabel` | `string` | `'Cancel'` | Label for the cancel button |
164
165
  | `confirmLabel` | `string` | `'Confirm'` | Label for the confirm button |
165
166
  | `showCross` | `boolean` | `true` | Whether to show a close icon in the header |
package/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // DO NOT MODIFY THIS FILE - IT IS AUTOMATICALLY GENERATED ON COMMITS.
3
3
 
4
4
  import { type ReactNode, type ComponentType, type RefObject } from 'react';
5
- import { type StyleProp, type ViewStyle } from 'react-native';
5
+ import { type StyleProp, type ViewStyle, type ViewProps } from 'react-native';
6
6
  type SupportedOrientation = 'portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right';
7
7
  export declare const _PropsJsonSchema: {};
8
8
  export interface ModalProps {
@@ -22,6 +22,8 @@ export interface ModalProps {
22
22
  ref?: RefObject<any>;
23
23
  /** Header title text */
24
24
  title?: string;
25
+ /** Accessible role for the modal surface on web @default 'dialog' */
26
+ role?: ViewProps['role'];
25
27
  /** Label for cancel action @default 'Cancel' */
26
28
  cancelLabel?: string;
27
29
  /** Label for confirm action @default 'Confirm' */
package/index.tsx CHANGED
@@ -5,7 +5,7 @@ import React, {
5
5
  type ComponentType,
6
6
  type RefObject
7
7
  } from 'react'
8
- import { SafeAreaView, Modal as RNModal, type StyleProp, type ViewStyle } from 'react-native'
8
+ import { SafeAreaView, Modal as RNModal, type StyleProp, type ViewStyle, type ViewProps } from 'react-native'
9
9
  import { pug, observer, $ } from 'startupjs'
10
10
  import { themed } from '@startupjs-ui/core'
11
11
  import Portal from '@startupjs-ui/portal'
@@ -48,6 +48,8 @@ export interface ModalProps {
48
48
  ref?: RefObject<any>
49
49
  /** Header title text */
50
50
  title?: string
51
+ /** Accessible role for the modal surface on web @default 'dialog' */
52
+ role?: ViewProps['role']
51
53
  /** Label for cancel action @default 'Cancel' */
52
54
  cancelLabel?: string
53
55
  /** Label for confirm action @default 'Confirm' */
@@ -95,6 +97,7 @@ function ModalRoot ({
95
97
  $visible,
96
98
  ref,
97
99
  title,
100
+ role,
98
101
  cancelLabel = DEFAULT_CANCEL_LABEL,
99
102
  confirmLabel = DEFAULT_CONFIRM_LABEL,
100
103
  showCross = true,
@@ -175,6 +178,7 @@ function ModalRoot ({
175
178
  modalStyle=modalStyle
176
179
  variant=variant
177
180
  title=title
181
+ role=role
178
182
  cancelLabel=cancelLabel
179
183
  confirmLabel=confirmLabel
180
184
  showCross=showCross
package/layout.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { useId, type ReactNode, type ComponentType } from 'react'
2
- import { View, TouchableOpacity, type StyleProp, type ViewStyle } from 'react-native'
2
+ import { View, TouchableOpacity, type StyleProp, type ViewStyle, type ViewProps } from 'react-native'
3
3
  import { pug, observer } from 'startupjs'
4
4
  import { themed } from '@startupjs-ui/core'
5
5
  import ModalHeader from './ModalHeader'
@@ -18,6 +18,8 @@ export interface ModalLayoutProps {
18
18
  variant?: 'window' | 'fullscreen'
19
19
  /** Title rendered when no custom header provided */
20
20
  title?: string
21
+ /** Accessible role for the modal surface on web @default 'dialog' */
22
+ role?: ViewProps['role']
21
23
  /** DEPRECATED: use cancelLabel instead */
22
24
  dismissLabel?: string
23
25
  /** Cancel action label @default 'Cancel' */
@@ -48,6 +50,7 @@ function Modal ({
48
50
  children,
49
51
  variant,
50
52
  title,
53
+ role,
51
54
  dismissLabel,
52
55
  cancelLabel = DEFAULT_CANCEL_LABEL,
53
56
  confirmLabel = DEFAULT_CONFIRM_LABEL,
@@ -205,8 +208,8 @@ function Modal ({
205
208
  ModalElement.modal(
206
209
  style=modalStyle
207
210
  styleName=[variant]
208
- role='dialog'
209
- aria-modal=true
211
+ role=role ?? 'dialog'
212
+ aria-modal
210
213
  aria-label=titleId ? undefined : dialogTitle
211
214
  aria-labelledby=titleId
212
215
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/modal",
3
- "version": "0.2.0-alpha.0",
3
+ "version": "0.2.0-alpha.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,18 +8,18 @@
8
8
  "types": "index.d.ts",
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@startupjs-ui/button": "^0.2.0-alpha.0",
12
- "@startupjs-ui/core": "^0.2.0-alpha.0",
13
- "@startupjs-ui/div": "^0.2.0-alpha.0",
14
- "@startupjs-ui/icon": "^0.2.0-alpha.0",
15
- "@startupjs-ui/portal": "^0.2.0-alpha.0",
16
- "@startupjs-ui/scroll-view": "^0.2.0-alpha.0",
17
- "@startupjs-ui/span": "^0.2.0-alpha.0"
11
+ "@startupjs-ui/button": "^0.2.0-alpha.1",
12
+ "@startupjs-ui/core": "^0.2.0-alpha.1",
13
+ "@startupjs-ui/div": "^0.2.0-alpha.1",
14
+ "@startupjs-ui/icon": "^0.2.0-alpha.1",
15
+ "@startupjs-ui/portal": "^0.2.0-alpha.1",
16
+ "@startupjs-ui/scroll-view": "^0.2.0-alpha.1",
17
+ "@startupjs-ui/span": "^0.2.0-alpha.1"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "react": "*",
21
21
  "react-native": "*",
22
22
  "startupjs": "*"
23
23
  },
24
- "gitHead": "a428246a18d0e7f77809043c8240253240d11d66"
24
+ "gitHead": "b48004779559b16c96a2a1995dab13b998eafce9"
25
25
  }