@unofficialbox/box-open-elements-react 0.27.0 → 0.28.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/dist/button.d.ts +2 -0
- package/dist/button.js +3 -1
- package/dist/dialog.d.ts +6 -0
- package/dist/dialog.js +7 -1
- package/dist/drawer.d.ts +2 -0
- package/dist/drawer.js +3 -1
- package/dist/text-field.d.ts +2 -0
- package/dist/text-field.js +3 -1
- package/package.json +2 -2
package/dist/button.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { NativeEventHandler } from "./events.js";
|
|
|
4
4
|
export type ButtonProps = Omit<WebComponentProps, "onClick"> & {
|
|
5
5
|
/** Button label text (maps to the `label` property / attribute). */
|
|
6
6
|
label?: string;
|
|
7
|
+
accessibleLabel?: string;
|
|
7
8
|
/** Visual tone: `primary` (default), `neutral`, `danger`. */
|
|
8
9
|
tone?: string;
|
|
9
10
|
/** Control size: `small`, `medium` (default), `large`. */
|
|
@@ -31,6 +32,7 @@ export type ButtonProps = Omit<WebComponentProps, "onClick"> & {
|
|
|
31
32
|
export declare const Button: import("react").ForwardRefExoticComponent<Omit<WebComponentProps, "onClick"> & {
|
|
32
33
|
/** Button label text (maps to the `label` property / attribute). */
|
|
33
34
|
label?: string;
|
|
35
|
+
accessibleLabel?: string;
|
|
34
36
|
/** Visual tone: `primary` (default), `neutral`, `danger`. */
|
|
35
37
|
tone?: string;
|
|
36
38
|
/** Control size: `small`, `medium` (default), `large`. */
|
package/dist/button.js
CHANGED
|
@@ -15,12 +15,14 @@ ButtonElement.register();
|
|
|
15
15
|
export const Button = createWebComponent({
|
|
16
16
|
tagName: "box-button",
|
|
17
17
|
displayName: "Button",
|
|
18
|
-
propertyNames: ["label", "tone", "size", "disabled"],
|
|
18
|
+
propertyNames: ["label", "accessibleLabel", "tone", "size", "disabled"],
|
|
19
19
|
events: [{ propName: "onClick", eventName: "click" }],
|
|
20
20
|
sync: (element, props) => {
|
|
21
21
|
if (props.label !== undefined) {
|
|
22
22
|
element.label = props.label;
|
|
23
23
|
}
|
|
24
|
+
if (props.accessibleLabel !== undefined)
|
|
25
|
+
element.accessibleLabel = props.accessibleLabel;
|
|
24
26
|
if (props.tone !== undefined) {
|
|
25
27
|
element.tone = props.tone;
|
|
26
28
|
}
|
package/dist/dialog.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export type DialogProps = WebComponentProps & {
|
|
|
9
9
|
heading?: string;
|
|
10
10
|
description?: string;
|
|
11
11
|
confirmLabel?: string;
|
|
12
|
+
confirmDisabled?: boolean;
|
|
13
|
+
confirmBusy?: boolean;
|
|
14
|
+
confirmBusyLabel?: string;
|
|
12
15
|
size?: DialogSize;
|
|
13
16
|
onOpenChanged?: CustomEventHandler<DialogElement, {
|
|
14
17
|
open: boolean;
|
|
@@ -26,6 +29,9 @@ export declare const Dialog: import("react").ForwardRefExoticComponent<{
|
|
|
26
29
|
heading?: string;
|
|
27
30
|
description?: string;
|
|
28
31
|
confirmLabel?: string;
|
|
32
|
+
confirmDisabled?: boolean;
|
|
33
|
+
confirmBusy?: boolean;
|
|
34
|
+
confirmBusyLabel?: string;
|
|
29
35
|
size?: DialogSize;
|
|
30
36
|
onOpenChanged?: CustomEventHandler<DialogElement, {
|
|
31
37
|
open: boolean;
|
package/dist/dialog.js
CHANGED
|
@@ -5,7 +5,7 @@ DialogElement.register();
|
|
|
5
5
|
export const Dialog = createWebComponent({
|
|
6
6
|
tagName: "box-dialog",
|
|
7
7
|
displayName: "Dialog",
|
|
8
|
-
propertyNames: ["open", "heading", "description", "confirmLabel", "size"],
|
|
8
|
+
propertyNames: ["open", "heading", "description", "confirmLabel", "confirmDisabled", "confirmBusy", "confirmBusyLabel", "size"],
|
|
9
9
|
events: [
|
|
10
10
|
{ propName: "onOpenChanged", eventName: "open-changed" },
|
|
11
11
|
{ propName: "onConfirm", eventName: "confirm" },
|
|
@@ -21,6 +21,12 @@ export const Dialog = createWebComponent({
|
|
|
21
21
|
if (props.confirmLabel !== undefined) {
|
|
22
22
|
element.confirmLabel = props.confirmLabel;
|
|
23
23
|
}
|
|
24
|
+
if (props.confirmDisabled !== undefined)
|
|
25
|
+
element.confirmDisabled = props.confirmDisabled;
|
|
26
|
+
if (props.confirmBusy !== undefined)
|
|
27
|
+
element.confirmBusy = props.confirmBusy;
|
|
28
|
+
if (props.confirmBusyLabel !== undefined)
|
|
29
|
+
element.confirmBusyLabel = props.confirmBusyLabel;
|
|
24
30
|
if (props.size !== undefined) {
|
|
25
31
|
element.size = props.size;
|
|
26
32
|
}
|
package/dist/drawer.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type DrawerProps = WebComponentProps & {
|
|
|
11
11
|
position?: string;
|
|
12
12
|
size?: string;
|
|
13
13
|
busy?: boolean;
|
|
14
|
+
hideCloseButton?: boolean;
|
|
14
15
|
onOpenChanged?: CustomEventHandler<DrawerRef, {
|
|
15
16
|
open: boolean;
|
|
16
17
|
}>;
|
|
@@ -30,6 +31,7 @@ export declare const Drawer: import("react").ForwardRefExoticComponent<{
|
|
|
30
31
|
position?: string;
|
|
31
32
|
size?: string;
|
|
32
33
|
busy?: boolean;
|
|
34
|
+
hideCloseButton?: boolean;
|
|
33
35
|
onOpenChanged?: CustomEventHandler<DrawerRef, {
|
|
34
36
|
open: boolean;
|
|
35
37
|
}>;
|
package/dist/drawer.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createWebComponent } from "./create-web-component.js";
|
|
|
4
4
|
export const Drawer = createWebComponent({
|
|
5
5
|
tagName: DrawerRef.tagName,
|
|
6
6
|
displayName: "Drawer",
|
|
7
|
-
propertyNames: ["heading", "description", "open", "position", "size", "busy"],
|
|
7
|
+
propertyNames: ["heading", "description", "open", "position", "size", "busy", "hideCloseButton"],
|
|
8
8
|
events: [{ propName: "onOpenChanged", eventName: "open-changed" }, { propName: "onDismiss", eventName: "dismiss" }],
|
|
9
9
|
sync: (element, props) => {
|
|
10
10
|
if (props.heading !== undefined)
|
|
@@ -19,5 +19,7 @@ export const Drawer = createWebComponent({
|
|
|
19
19
|
element.size = props.size;
|
|
20
20
|
if (props.busy !== undefined)
|
|
21
21
|
element.busy = props.busy;
|
|
22
|
+
if (props.hideCloseButton !== undefined)
|
|
23
|
+
element.hideCloseButton = props.hideCloseButton;
|
|
22
24
|
},
|
|
23
25
|
});
|
package/dist/text-field.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type TextFieldProps = WebComponentProps & {
|
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
type?: "text" | "password" | "email" | "tel" | "url" | "search" | "number";
|
|
9
9
|
reveal?: boolean;
|
|
10
|
+
revealLabel?: string;
|
|
10
11
|
autocomplete?: string;
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
name?: string;
|
|
@@ -27,6 +28,7 @@ export declare const TextField: import("react").ForwardRefExoticComponent<{
|
|
|
27
28
|
placeholder?: string;
|
|
28
29
|
type?: "text" | "password" | "email" | "tel" | "url" | "search" | "number";
|
|
29
30
|
reveal?: boolean;
|
|
31
|
+
revealLabel?: string;
|
|
30
32
|
autocomplete?: string;
|
|
31
33
|
disabled?: boolean;
|
|
32
34
|
name?: string;
|
package/dist/text-field.js
CHANGED
|
@@ -9,7 +9,7 @@ export const TextField = createWebComponent({
|
|
|
9
9
|
"label",
|
|
10
10
|
"value",
|
|
11
11
|
"placeholder",
|
|
12
|
-
"type", "reveal", "autocomplete",
|
|
12
|
+
"type", "reveal", "revealLabel", "autocomplete",
|
|
13
13
|
"disabled",
|
|
14
14
|
"name",
|
|
15
15
|
"invalid",
|
|
@@ -37,6 +37,8 @@ export const TextField = createWebComponent({
|
|
|
37
37
|
element.type = props.type;
|
|
38
38
|
if (props.reveal !== undefined)
|
|
39
39
|
element.reveal = props.reveal;
|
|
40
|
+
if (props.revealLabel !== undefined)
|
|
41
|
+
element.revealLabel = props.revealLabel;
|
|
40
42
|
if (props.autocomplete !== undefined)
|
|
41
43
|
element.autocomplete = props.autocomplete;
|
|
42
44
|
if (props.name !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unofficialbox/box-open-elements-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"description": "Optional React wrappers for box-open-elements Web Components. Thin adapters — core stays framework-agnostic.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://unofficialbox.github.io/box-open-elements",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"node": ">=20.9.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@unofficialbox/box-open-elements": "^0.
|
|
45
|
+
"@unofficialbox/box-open-elements": "^0.28.1",
|
|
46
46
|
"react": "^19.0.0",
|
|
47
47
|
"react-dom": "^19.0.0"
|
|
48
48
|
},
|