@entropix/react 0.3.0 → 1.0.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/accordion.cjs +27 -0
- package/dist/accordion.css +57 -0
- package/dist/accordion.d.cts +30 -0
- package/dist/accordion.d.ts +30 -0
- package/dist/accordion.js +6 -0
- package/dist/button.cjs +15 -0
- package/dist/button.css +113 -0
- package/dist/button.d.cts +25 -0
- package/dist/button.d.ts +25 -0
- package/dist/button.js +6 -0
- package/dist/checkbox.cjs +15 -0
- package/dist/checkbox.css +89 -0
- package/dist/checkbox.d.cts +26 -0
- package/dist/checkbox.d.ts +26 -0
- package/dist/checkbox.js +6 -0
- package/dist/chunk-2MKJZEUK.cjs +4 -0
- package/dist/chunk-34IVVIO3.cjs +119 -0
- package/dist/chunk-36ZHHJYV.js +79 -0
- package/dist/chunk-5DKE5YQD.cjs +10 -0
- package/dist/chunk-664P2RGR.js +108 -0
- package/dist/chunk-6NKHMBF3.cjs +97 -0
- package/dist/chunk-6UAQCHIW.js +8 -0
- package/dist/chunk-7AUIZOEH.cjs +84 -0
- package/dist/chunk-AVCBDUKH.js +3 -0
- package/dist/chunk-B5JZHE4I.cjs +90 -0
- package/dist/chunk-BN57JPKV.js +26 -0
- package/dist/chunk-BY4E26CV.js +114 -0
- package/dist/chunk-CL6JXZIY.js +88 -0
- package/dist/chunk-CTT3LXMZ.js +76 -0
- package/dist/chunk-EASSPJBG.cjs +110 -0
- package/dist/chunk-EWY7MSXF.cjs +94 -0
- package/dist/chunk-FJGLK3I4.js +89 -0
- package/dist/chunk-GTVBKK3W.js +88 -0
- package/dist/chunk-GZXXUFCJ.cjs +15 -0
- package/dist/chunk-IXH7OVN3.cjs +86 -0
- package/dist/chunk-KGIUECLG.cjs +91 -0
- package/dist/chunk-LDOP6DVX.cjs +28 -0
- package/dist/chunk-LJK6KK2H.cjs +43 -0
- package/dist/chunk-OT2HJUCB.js +84 -0
- package/dist/chunk-PILZGMQG.js +87 -0
- package/dist/chunk-PN42JF6U.js +92 -0
- package/dist/chunk-RPIYYBFJ.cjs +90 -0
- package/dist/chunk-S6DVQAH4.cjs +240 -0
- package/dist/chunk-U5CZHO6D.js +13 -0
- package/dist/chunk-UGCCJI2F.js +111 -0
- package/dist/chunk-W6N4D4N4.js +230 -0
- package/dist/chunk-Y2M2LJGJ.js +41 -0
- package/dist/chunk-YJG5KX6O.cjs +81 -0
- package/dist/chunk-ZG4PZBSL.cjs +113 -0
- package/dist/dialog.cjs +39 -0
- package/dist/dialog.css +89 -0
- package/dist/dialog.d.cts +62 -0
- package/dist/dialog.d.ts +62 -0
- package/dist/dialog.js +6 -0
- package/dist/index.cjs +170 -1223
- package/dist/index.css +994 -1015
- package/dist/index.d.cts +17 -477
- package/dist/index.d.ts +17 -477
- package/dist/index.js +19 -1189
- package/dist/input.cjs +15 -0
- package/dist/input.css +135 -0
- package/dist/input.d.cts +37 -0
- package/dist/input.d.ts +37 -0
- package/dist/input.js +6 -0
- package/dist/layout.cjs +25 -0
- package/dist/layout.css +176 -0
- package/dist/layout.d.cts +108 -0
- package/dist/layout.d.ts +108 -0
- package/dist/layout.js +4 -0
- package/dist/menu.cjs +27 -0
- package/dist/menu.css +51 -0
- package/dist/menu.d.cts +31 -0
- package/dist/menu.d.ts +31 -0
- package/dist/menu.js +6 -0
- package/dist/radio.cjs +19 -0
- package/dist/radio.css +93 -0
- package/dist/radio.d.cts +37 -0
- package/dist/radio.d.ts +37 -0
- package/dist/radio.js +6 -0
- package/dist/select.cjs +27 -0
- package/dist/select.css +114 -0
- package/dist/select.d.cts +59 -0
- package/dist/select.d.ts +59 -0
- package/dist/select.js +6 -0
- package/dist/styles/accordion.css +1 -69
- package/dist/styles/button.css +1 -135
- package/dist/styles/checkbox.css +1 -121
- package/dist/styles/dialog.css +1 -104
- package/dist/styles/index.css +1 -16
- package/dist/styles/input.css +1 -178
- package/dist/styles/layout.css +1 -127
- package/dist/styles/menu.css +1 -64
- package/dist/styles/radio.css +1 -130
- package/dist/styles/select.css +1 -150
- package/dist/styles/switch.css +1 -52
- package/dist/styles/tabs.css +1 -86
- package/dist/styles/toggle.css +1 -47
- package/dist/switch.cjs +16 -0
- package/dist/switch.css +89 -0
- package/dist/switch.d.cts +14 -0
- package/dist/switch.d.ts +14 -0
- package/dist/switch.js +7 -0
- package/dist/tabs.cjs +27 -0
- package/dist/tabs.css +69 -0
- package/dist/tabs.d.cts +31 -0
- package/dist/tabs.d.ts +31 -0
- package/dist/tabs.js +6 -0
- package/dist/textarea.cjs +15 -0
- package/dist/textarea.css +135 -0
- package/dist/textarea.d.cts +41 -0
- package/dist/textarea.d.ts +41 -0
- package/dist/textarea.js +6 -0
- package/dist/toggle.cjs +19 -0
- package/dist/toggle.css +41 -0
- package/dist/toggle.d.cts +34 -0
- package/dist/toggle.d.ts +34 -0
- package/dist/toggle.js +6 -0
- package/package.json +135 -4
- package/dist/index.cjs.map +0 -1
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5DKE5YQD_cjs = require('./chunk-5DKE5YQD.cjs');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var Stack = react.forwardRef(function Stack2({ gap, align, fullWidth, as: Component = "div", className, children, ...rest }, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
+
Component,
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
className: chunk5DKE5YQD_cjs.cn(
|
|
13
|
+
"entropix-stack",
|
|
14
|
+
gap && `entropix-stack--gap-${gap}`,
|
|
15
|
+
align && `entropix-stack--align-${align}`,
|
|
16
|
+
fullWidth && "entropix-stack--full-width",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...rest,
|
|
20
|
+
children
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
var Inline = react.forwardRef(function Inline2({ gap, align, justify, wrap, as: Component = "div", className, children, ...rest }, ref) {
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26
|
+
Component,
|
|
27
|
+
{
|
|
28
|
+
ref,
|
|
29
|
+
className: chunk5DKE5YQD_cjs.cn(
|
|
30
|
+
"entropix-inline",
|
|
31
|
+
gap && `entropix-inline--gap-${gap}`,
|
|
32
|
+
align && `entropix-inline--align-${align}`,
|
|
33
|
+
justify && `entropix-inline--justify-${justify}`,
|
|
34
|
+
wrap && "entropix-inline--wrap",
|
|
35
|
+
className
|
|
36
|
+
),
|
|
37
|
+
...rest,
|
|
38
|
+
children
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
var Container = react.forwardRef(function Container2({ maxWidth = "lg", center, as: Component = "div", className, children, ...rest }, ref) {
|
|
43
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
+
Component,
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
className: chunk5DKE5YQD_cjs.cn(
|
|
48
|
+
"entropix-container",
|
|
49
|
+
`entropix-container--${maxWidth}`,
|
|
50
|
+
center && "entropix-container--center",
|
|
51
|
+
className
|
|
52
|
+
),
|
|
53
|
+
...rest,
|
|
54
|
+
children
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
var Divider = react.forwardRef(function Divider2({ orientation = "horizontal", spacing, className, ...rest }, ref) {
|
|
59
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
"hr",
|
|
61
|
+
{
|
|
62
|
+
ref,
|
|
63
|
+
role: orientation === "vertical" ? "separator" : void 0,
|
|
64
|
+
"aria-orientation": orientation === "vertical" ? "vertical" : void 0,
|
|
65
|
+
className: chunk5DKE5YQD_cjs.cn(
|
|
66
|
+
"entropix-divider",
|
|
67
|
+
orientation === "vertical" && "entropix-divider--vertical",
|
|
68
|
+
spacing && `entropix-divider--spacing-${spacing}`,
|
|
69
|
+
className
|
|
70
|
+
),
|
|
71
|
+
...rest
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
exports.Container = Container;
|
|
77
|
+
exports.Divider = Divider;
|
|
78
|
+
exports.Inline = Inline;
|
|
79
|
+
exports.Stack = Stack;
|
|
80
|
+
//# sourceMappingURL=chunk-YJG5KX6O.cjs.map
|
|
81
|
+
//# sourceMappingURL=chunk-YJG5KX6O.cjs.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkLJK6KK2H_cjs = require('./chunk-LJK6KK2H.cjs');
|
|
4
|
+
var chunk5DKE5YQD_cjs = require('./chunk-5DKE5YQD.cjs');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var core = require('@entropix/core');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
var Textarea = react.forwardRef(
|
|
10
|
+
function Textarea2({
|
|
11
|
+
value,
|
|
12
|
+
defaultValue,
|
|
13
|
+
onChange,
|
|
14
|
+
disabled,
|
|
15
|
+
readOnly,
|
|
16
|
+
required,
|
|
17
|
+
invalid,
|
|
18
|
+
label,
|
|
19
|
+
helperText,
|
|
20
|
+
errorMessage,
|
|
21
|
+
variant = "default",
|
|
22
|
+
size = "md",
|
|
23
|
+
rows,
|
|
24
|
+
resize = "vertical",
|
|
25
|
+
className,
|
|
26
|
+
placeholder,
|
|
27
|
+
name,
|
|
28
|
+
style,
|
|
29
|
+
...rest
|
|
30
|
+
}, ref) {
|
|
31
|
+
const isInvalid = invalid || !!errorMessage;
|
|
32
|
+
const {
|
|
33
|
+
value: inputValue,
|
|
34
|
+
isDisabled,
|
|
35
|
+
isReadOnly,
|
|
36
|
+
isRequired,
|
|
37
|
+
getInputProps,
|
|
38
|
+
getLabelProps,
|
|
39
|
+
getHelperTextProps,
|
|
40
|
+
getErrorMessageProps
|
|
41
|
+
} = core.useInput({
|
|
42
|
+
value,
|
|
43
|
+
defaultValue,
|
|
44
|
+
onChange,
|
|
45
|
+
disabled,
|
|
46
|
+
readOnly,
|
|
47
|
+
required,
|
|
48
|
+
invalid: isInvalid,
|
|
49
|
+
placeholder,
|
|
50
|
+
name
|
|
51
|
+
});
|
|
52
|
+
const propGetterReturn = getInputProps();
|
|
53
|
+
const ariaProps = chunkLJK6KK2H_cjs.mapAccessibilityToAria(propGetterReturn.accessibility);
|
|
54
|
+
const labelProps = getLabelProps();
|
|
55
|
+
const helperProps = getHelperTextProps();
|
|
56
|
+
const errorProps = getErrorMessageProps();
|
|
57
|
+
const handleChange = react.useCallback(
|
|
58
|
+
(event) => {
|
|
59
|
+
onChange?.(event.target.value);
|
|
60
|
+
},
|
|
61
|
+
[onChange]
|
|
62
|
+
);
|
|
63
|
+
const dataState = isInvalid ? "invalid" : isDisabled ? "disabled" : void 0;
|
|
64
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: chunk5DKE5YQD_cjs.cn("entropix-input-wrapper", className),
|
|
68
|
+
"data-state": dataState,
|
|
69
|
+
"data-variant": variant,
|
|
70
|
+
"data-size": size,
|
|
71
|
+
children: [
|
|
72
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
73
|
+
"label",
|
|
74
|
+
{
|
|
75
|
+
className: "entropix-input-label",
|
|
76
|
+
id: labelProps.id,
|
|
77
|
+
htmlFor: labelProps.htmlFor,
|
|
78
|
+
children: [
|
|
79
|
+
label,
|
|
80
|
+
isRequired && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-required", children: "*" })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
85
|
+
"textarea",
|
|
86
|
+
{
|
|
87
|
+
ref,
|
|
88
|
+
className: "entropix-textarea",
|
|
89
|
+
...ariaProps,
|
|
90
|
+
...rest,
|
|
91
|
+
name,
|
|
92
|
+
placeholder,
|
|
93
|
+
value: inputValue,
|
|
94
|
+
onChange: handleChange,
|
|
95
|
+
disabled: isDisabled || void 0,
|
|
96
|
+
readOnly: isReadOnly || void 0,
|
|
97
|
+
rows,
|
|
98
|
+
style: { ...style, resize },
|
|
99
|
+
"data-state": dataState,
|
|
100
|
+
"data-variant": variant,
|
|
101
|
+
"data-size": size
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
isInvalid && errorMessage ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-error", ...errorProps, children: errorMessage }) : helperText ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "entropix-input-helper", ...helperProps, children: helperText }) : null
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
exports.Textarea = Textarea;
|
|
112
|
+
//# sourceMappingURL=chunk-ZG4PZBSL.cjs.map
|
|
113
|
+
//# sourceMappingURL=chunk-ZG4PZBSL.cjs.map
|
package/dist/dialog.cjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkS6DVQAH4_cjs = require('./chunk-S6DVQAH4.cjs');
|
|
4
|
+
require('./chunk-LDOP6DVX.cjs');
|
|
5
|
+
require('./chunk-LJK6KK2H.cjs');
|
|
6
|
+
require('./chunk-5DKE5YQD.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "Dialog", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkS6DVQAH4_cjs.Dialog; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "DialogClose", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkS6DVQAH4_cjs.DialogClose; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "DialogContent", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkS6DVQAH4_cjs.DialogContent; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "DialogDescription", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunkS6DVQAH4_cjs.DialogDescription; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "DialogOverlay", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return chunkS6DVQAH4_cjs.DialogOverlay; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "DialogTitle", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return chunkS6DVQAH4_cjs.DialogTitle; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "DialogTrigger", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return chunkS6DVQAH4_cjs.DialogTrigger; }
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=dialog.cjs.map
|
|
39
|
+
//# sourceMappingURL=dialog.cjs.map
|
package/dist/dialog.css
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* src/styles/dialog.css */
|
|
2
|
+
.entropix-dialog-overlay {
|
|
3
|
+
position: fixed;
|
|
4
|
+
inset: 0;
|
|
5
|
+
background: rgba(0, 0, 0, 0.5);
|
|
6
|
+
z-index: 50;
|
|
7
|
+
}
|
|
8
|
+
.entropix-dialog-content {
|
|
9
|
+
position: fixed;
|
|
10
|
+
top: 50%;
|
|
11
|
+
left: 50%;
|
|
12
|
+
transform: translate(-50%, -50%);
|
|
13
|
+
background: var(--entropix-color-bg-primary);
|
|
14
|
+
border-radius: var(--entropix-radius-lg);
|
|
15
|
+
box-shadow: var(--entropix-shadow-xl);
|
|
16
|
+
padding: var(--entropix-spacing-6);
|
|
17
|
+
z-index: 51;
|
|
18
|
+
max-width: 480px;
|
|
19
|
+
width: 90vw;
|
|
20
|
+
max-height: 85vh;
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
}
|
|
23
|
+
.entropix-dialog-content:focus {
|
|
24
|
+
outline: none;
|
|
25
|
+
}
|
|
26
|
+
.entropix-dialog-title {
|
|
27
|
+
margin: 0;
|
|
28
|
+
margin-bottom: var(--entropix-spacing-2);
|
|
29
|
+
font-family: var(--entropix-text-heading-md-font-family);
|
|
30
|
+
font-size: var(--entropix-text-heading-md-font-size);
|
|
31
|
+
font-weight: var(--entropix-text-heading-md-font-weight);
|
|
32
|
+
line-height: var(--entropix-text-heading-md-line-height);
|
|
33
|
+
color: var(--entropix-color-text-primary);
|
|
34
|
+
}
|
|
35
|
+
.entropix-dialog-description {
|
|
36
|
+
margin: 0;
|
|
37
|
+
margin-bottom: var(--entropix-spacing-4);
|
|
38
|
+
font-family: var(--entropix-text-body-md-font-family);
|
|
39
|
+
font-size: var(--entropix-text-body-md-font-size);
|
|
40
|
+
font-weight: var(--entropix-text-body-md-font-weight);
|
|
41
|
+
line-height: var(--entropix-text-body-md-line-height);
|
|
42
|
+
color: var(--entropix-color-text-secondary);
|
|
43
|
+
}
|
|
44
|
+
.entropix-dialog-close {
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: var(--entropix-spacing-3);
|
|
47
|
+
right: var(--entropix-spacing-3);
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
width: 32px;
|
|
52
|
+
height: 32px;
|
|
53
|
+
padding: 0;
|
|
54
|
+
border: none;
|
|
55
|
+
border-radius: var(--entropix-radius-sm);
|
|
56
|
+
background: transparent;
|
|
57
|
+
color: var(--entropix-color-text-secondary);
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
transition: background var(--entropix-duration-fast) var(--entropix-easing-default);
|
|
60
|
+
}
|
|
61
|
+
.entropix-dialog-close:hover {
|
|
62
|
+
background: var(--entropix-color-action-secondary-default);
|
|
63
|
+
}
|
|
64
|
+
.entropix-dialog-close:focus-visible {
|
|
65
|
+
outline: 2px solid var(--entropix-color-border-focus);
|
|
66
|
+
outline-offset: 2px;
|
|
67
|
+
}
|
|
68
|
+
.entropix-dialog-trigger {
|
|
69
|
+
}
|
|
70
|
+
@media (max-width: 767px) {
|
|
71
|
+
.entropix-dialog-content {
|
|
72
|
+
top: auto;
|
|
73
|
+
bottom: 0;
|
|
74
|
+
left: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
transform: none;
|
|
77
|
+
width: 100%;
|
|
78
|
+
max-width: 100%;
|
|
79
|
+
border-radius: var(--entropix-radius-lg) var(--entropix-radius-lg) 0 0;
|
|
80
|
+
max-height: 90vh;
|
|
81
|
+
padding: var(--entropix-spacing-5);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@media (min-width: 768px) {
|
|
85
|
+
.entropix-dialog-content {
|
|
86
|
+
max-width: 560px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/*# sourceMappingURL=dialog.css.map */
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { UseDialogOptions } from '@entropix/core';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
|
|
5
|
+
interface DialogProps extends UseDialogOptions {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Dialog root — provides dialog state to compound sub-components.
|
|
10
|
+
* Renders no DOM of its own.
|
|
11
|
+
*/
|
|
12
|
+
declare function Dialog({ children, isOpen, defaultOpen, onOpenChange, closeOnOverlayPress, closeOnEscape, modal, role, }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
interface DialogTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* DialogTrigger — button that opens/closes the dialog.
|
|
18
|
+
* Maps core's getTriggerProps() to DOM attributes.
|
|
19
|
+
*/
|
|
20
|
+
declare const DialogTrigger: react.ForwardRefExoticComponent<DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
|
|
22
|
+
interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* DialogContent — the dialog panel rendered in a portal.
|
|
26
|
+
*
|
|
27
|
+
* Implements focus trap, focus restore, Escape-to-close keyboard handling,
|
|
28
|
+
* and portal rendering. SSR-safe via useEffect mount gating.
|
|
29
|
+
*/
|
|
30
|
+
declare const DialogContent: react.ForwardRefExoticComponent<DialogContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
|
|
32
|
+
interface DialogTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* DialogTitle — heading element with auto-linked ID for aria-labelledby.
|
|
36
|
+
*/
|
|
37
|
+
declare const DialogTitle: react.ForwardRefExoticComponent<DialogTitleProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
38
|
+
|
|
39
|
+
interface DialogDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* DialogDescription — paragraph element with auto-linked ID for aria-describedby.
|
|
43
|
+
*/
|
|
44
|
+
declare const DialogDescription: react.ForwardRefExoticComponent<DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>>;
|
|
45
|
+
|
|
46
|
+
interface DialogCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* DialogClose — button that closes the dialog.
|
|
50
|
+
* Maps core's getCloseProps() to DOM attributes.
|
|
51
|
+
*/
|
|
52
|
+
declare const DialogClose: react.ForwardRefExoticComponent<DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
53
|
+
|
|
54
|
+
interface DialogOverlayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* DialogOverlay — backdrop element behind the dialog.
|
|
58
|
+
* Hidden from the accessibility tree. Optionally closes the dialog on click.
|
|
59
|
+
*/
|
|
60
|
+
declare const DialogOverlay: react.ForwardRefExoticComponent<DialogOverlayProps & react.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
|
|
62
|
+
export { Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogOverlay, type DialogOverlayProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps };
|
package/dist/dialog.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { UseDialogOptions } from '@entropix/core';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
|
|
5
|
+
interface DialogProps extends UseDialogOptions {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Dialog root — provides dialog state to compound sub-components.
|
|
10
|
+
* Renders no DOM of its own.
|
|
11
|
+
*/
|
|
12
|
+
declare function Dialog({ children, isOpen, defaultOpen, onOpenChange, closeOnOverlayPress, closeOnEscape, modal, role, }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
interface DialogTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* DialogTrigger — button that opens/closes the dialog.
|
|
18
|
+
* Maps core's getTriggerProps() to DOM attributes.
|
|
19
|
+
*/
|
|
20
|
+
declare const DialogTrigger: react.ForwardRefExoticComponent<DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
|
|
22
|
+
interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* DialogContent — the dialog panel rendered in a portal.
|
|
26
|
+
*
|
|
27
|
+
* Implements focus trap, focus restore, Escape-to-close keyboard handling,
|
|
28
|
+
* and portal rendering. SSR-safe via useEffect mount gating.
|
|
29
|
+
*/
|
|
30
|
+
declare const DialogContent: react.ForwardRefExoticComponent<DialogContentProps & react.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
|
|
32
|
+
interface DialogTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* DialogTitle — heading element with auto-linked ID for aria-labelledby.
|
|
36
|
+
*/
|
|
37
|
+
declare const DialogTitle: react.ForwardRefExoticComponent<DialogTitleProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
38
|
+
|
|
39
|
+
interface DialogDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* DialogDescription — paragraph element with auto-linked ID for aria-describedby.
|
|
43
|
+
*/
|
|
44
|
+
declare const DialogDescription: react.ForwardRefExoticComponent<DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>>;
|
|
45
|
+
|
|
46
|
+
interface DialogCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* DialogClose — button that closes the dialog.
|
|
50
|
+
* Maps core's getCloseProps() to DOM attributes.
|
|
51
|
+
*/
|
|
52
|
+
declare const DialogClose: react.ForwardRefExoticComponent<DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
53
|
+
|
|
54
|
+
interface DialogOverlayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* DialogOverlay — backdrop element behind the dialog.
|
|
58
|
+
* Hidden from the accessibility tree. Optionally closes the dialog on click.
|
|
59
|
+
*/
|
|
60
|
+
declare const DialogOverlay: react.ForwardRefExoticComponent<DialogOverlayProps & react.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
|
|
62
|
+
export { Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogOverlay, type DialogOverlayProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps };
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogTitle, DialogTrigger } from './chunk-W6N4D4N4.js';
|
|
2
|
+
import './chunk-BN57JPKV.js';
|
|
3
|
+
import './chunk-Y2M2LJGJ.js';
|
|
4
|
+
import './chunk-6UAQCHIW.js';
|
|
5
|
+
//# sourceMappingURL=dialog.js.map
|
|
6
|
+
//# sourceMappingURL=dialog.js.map
|