@zag-js/toast 0.0.0-dev-20220714091855 → 0.0.0-dev-20220730065001
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/index.d.ts +2 -0
- package/dist/index.js +6 -0
- package/dist/index.mjs +6 -0
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -177,6 +177,7 @@ declare function createToastMachine(options?: Options): _zag_js_core.Machine<Mac
|
|
|
177
177
|
declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
|
|
178
178
|
type: Type;
|
|
179
179
|
title: string | undefined;
|
|
180
|
+
description: string | undefined;
|
|
180
181
|
placement: Placement;
|
|
181
182
|
isVisible: boolean;
|
|
182
183
|
isPaused: boolean;
|
|
@@ -186,6 +187,7 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
186
187
|
rootProps: T["element"];
|
|
187
188
|
progressbarProps: T["element"];
|
|
188
189
|
titleProps: T["element"];
|
|
190
|
+
descriptionProps: T["element"];
|
|
189
191
|
closeButtonProps: T["button"];
|
|
190
192
|
render(): any;
|
|
191
193
|
};
|
package/dist/index.js
CHANGED
|
@@ -112,6 +112,7 @@ var dom = defineDomHelpers({
|
|
|
112
112
|
getGroupId: (placement) => `toast-group:${placement}`,
|
|
113
113
|
getContainerId: (ctx) => `toast:${ctx.id}`,
|
|
114
114
|
getTitleId: (ctx) => `toast-title:${ctx.id}`,
|
|
115
|
+
getDescriptionId: (ctx) => `toast-description:${ctx.id}`,
|
|
115
116
|
getCloseButtonId: (ctx) => `toast-close-button:${ctx.id}`,
|
|
116
117
|
getPortalId: (ctx) => `toast-portal:${ctx.id}`,
|
|
117
118
|
getPortalEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getPortalId(ctx)),
|
|
@@ -560,6 +561,7 @@ function connect(state, send, normalize) {
|
|
|
560
561
|
return {
|
|
561
562
|
type: state.context.type,
|
|
562
563
|
title: state.context.title,
|
|
564
|
+
description: state.context.description,
|
|
563
565
|
placement,
|
|
564
566
|
isVisible,
|
|
565
567
|
isPaused,
|
|
@@ -632,6 +634,10 @@ function connect(state, send, normalize) {
|
|
|
632
634
|
"data-part": "title",
|
|
633
635
|
id: dom.getTitleId(state.context)
|
|
634
636
|
}),
|
|
637
|
+
descriptionProps: normalize.element({
|
|
638
|
+
"data-part": "description",
|
|
639
|
+
id: dom.getDescriptionId(state.context)
|
|
640
|
+
}),
|
|
635
641
|
closeButtonProps: normalize.button({
|
|
636
642
|
id: dom.getCloseButtonId(state.context),
|
|
637
643
|
"data-part": "close-button",
|
package/dist/index.mjs
CHANGED
|
@@ -83,6 +83,7 @@ var dom = defineDomHelpers({
|
|
|
83
83
|
getGroupId: (placement) => `toast-group:${placement}`,
|
|
84
84
|
getContainerId: (ctx) => `toast:${ctx.id}`,
|
|
85
85
|
getTitleId: (ctx) => `toast-title:${ctx.id}`,
|
|
86
|
+
getDescriptionId: (ctx) => `toast-description:${ctx.id}`,
|
|
86
87
|
getCloseButtonId: (ctx) => `toast-close-button:${ctx.id}`,
|
|
87
88
|
getPortalId: (ctx) => `toast-portal:${ctx.id}`,
|
|
88
89
|
getPortalEl: (ctx) => dom.getDoc(ctx).getElementById(dom.getPortalId(ctx)),
|
|
@@ -531,6 +532,7 @@ function connect(state, send, normalize) {
|
|
|
531
532
|
return {
|
|
532
533
|
type: state.context.type,
|
|
533
534
|
title: state.context.title,
|
|
535
|
+
description: state.context.description,
|
|
534
536
|
placement,
|
|
535
537
|
isVisible,
|
|
536
538
|
isPaused,
|
|
@@ -603,6 +605,10 @@ function connect(state, send, normalize) {
|
|
|
603
605
|
"data-part": "title",
|
|
604
606
|
id: dom.getTitleId(state.context)
|
|
605
607
|
}),
|
|
608
|
+
descriptionProps: normalize.element({
|
|
609
|
+
"data-part": "description",
|
|
610
|
+
id: dom.getDescriptionId(state.context)
|
|
611
|
+
}),
|
|
606
612
|
closeButtonProps: normalize.button({
|
|
607
613
|
id: dom.getCloseButtonId(state.context),
|
|
608
614
|
"data-part": "close-button",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/toast",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20220730065001",
|
|
4
4
|
"description": "Core logic for the toast widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/core": "0.
|
|
33
|
-
"@zag-js/types": "0.
|
|
32
|
+
"@zag-js/core": "0.1.9",
|
|
33
|
+
"@zag-js/types": "0.2.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zag-js/dom-utils": "0.
|
|
37
|
-
"@zag-js/utils": "0.
|
|
36
|
+
"@zag-js/dom-utils": "0.1.8",
|
|
37
|
+
"@zag-js/utils": "0.1.3"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build-fast": "tsup src/index.ts --format=esm,cjs",
|