@zag-js/toast 0.0.0-dev-20221208144713 → 0.0.0-dev-20221209161829
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 +11 -11
- package/dist/index.js +6 -5
- package/dist/index.mjs +6 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -967,57 +967,57 @@ declare const anatomy: Omit<{
|
|
|
967
967
|
}>;
|
|
968
968
|
}, "parts">;
|
|
969
969
|
extendWith: <V_20 extends string>(...parts: V_20[]) => Omit<any, "parts">;
|
|
970
|
-
build: () => Record<"
|
|
970
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18 | V_19, {
|
|
971
971
|
selector: string;
|
|
972
972
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
973
973
|
}>;
|
|
974
974
|
}, "parts">;
|
|
975
|
-
build: () => Record<"
|
|
975
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17 | V_18, {
|
|
976
976
|
selector: string;
|
|
977
977
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
978
978
|
}>;
|
|
979
979
|
}, "parts">;
|
|
980
|
-
build: () => Record<"
|
|
980
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16 | V_17, {
|
|
981
981
|
selector: string;
|
|
982
982
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
983
983
|
}>;
|
|
984
984
|
}, "parts">;
|
|
985
|
-
build: () => Record<"
|
|
985
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15 | V_16, {
|
|
986
986
|
selector: string;
|
|
987
987
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
988
988
|
}>;
|
|
989
989
|
}, "parts">;
|
|
990
|
-
build: () => Record<"
|
|
990
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11 | V_12 | V_13 | V_14 | V_15, {
|
|
991
991
|
selector: string;
|
|
992
992
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
993
993
|
}>;
|
|
994
994
|
}, "parts">;
|
|
995
|
-
build: () => Record<"
|
|
995
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11 | V_12 | V_13 | V_14, {
|
|
996
996
|
selector: string;
|
|
997
997
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
998
998
|
}>;
|
|
999
999
|
}, "parts">;
|
|
1000
|
-
build: () => Record<"
|
|
1000
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11 | V_12 | V_13, {
|
|
1001
1001
|
selector: string;
|
|
1002
1002
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
1003
1003
|
}>;
|
|
1004
1004
|
}, "parts">;
|
|
1005
|
-
build: () => Record<"
|
|
1005
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11 | V_12, {
|
|
1006
1006
|
selector: string;
|
|
1007
1007
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
1008
1008
|
}>;
|
|
1009
1009
|
}, "parts">;
|
|
1010
|
-
build: () => Record<"
|
|
1010
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10 | V_11, {
|
|
1011
1011
|
selector: string;
|
|
1012
1012
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
1013
1013
|
}>;
|
|
1014
1014
|
}, "parts">;
|
|
1015
|
-
build: () => Record<"
|
|
1015
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger" | V_10, {
|
|
1016
1016
|
selector: string;
|
|
1017
1017
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
1018
1018
|
}>;
|
|
1019
1019
|
}, "parts">;
|
|
1020
|
-
build: () => Record<"
|
|
1020
|
+
build: () => Record<"group" | "root" | "title" | "description" | "closeTrigger", {
|
|
1021
1021
|
selector: string;
|
|
1022
1022
|
attrs: Record<"data-scope" | "data-part", string>;
|
|
1023
1023
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -139,6 +139,11 @@ function warn(...a) {
|
|
|
139
139
|
// src/toast-group.connect.ts
|
|
140
140
|
var import_core = require("@zag-js/core");
|
|
141
141
|
|
|
142
|
+
// src/toast.anatomy.ts
|
|
143
|
+
var import_anatomy = require("@zag-js/anatomy");
|
|
144
|
+
var anatomy = (0, import_anatomy.createAnatomy)("toast").parts("group", "root", "title", "description", "closeTrigger");
|
|
145
|
+
var parts = anatomy.build();
|
|
146
|
+
|
|
142
147
|
// src/toast.dom.ts
|
|
143
148
|
var dom = defineDomHelpers({
|
|
144
149
|
getGroupId: (placement) => `toast-group:${placement}`,
|
|
@@ -313,6 +318,7 @@ function groupConnect(state, send, normalize) {
|
|
|
313
318
|
getGroupProps(options) {
|
|
314
319
|
const { placement, label = "Notifications" } = options;
|
|
315
320
|
return normalize.element({
|
|
321
|
+
...parts.group.attrs,
|
|
316
322
|
tabIndex: -1,
|
|
317
323
|
"aria-label": label,
|
|
318
324
|
id: dom.getGroupId(placement),
|
|
@@ -586,11 +592,6 @@ function groupMachine(userContext) {
|
|
|
586
592
|
});
|
|
587
593
|
}
|
|
588
594
|
|
|
589
|
-
// src/toast.anatomy.ts
|
|
590
|
-
var import_anatomy = require("@zag-js/anatomy");
|
|
591
|
-
var anatomy = (0, import_anatomy.createAnatomy)("toast").parts("root", "title", "description", "closeTrigger");
|
|
592
|
-
var parts = anatomy.build();
|
|
593
|
-
|
|
594
595
|
// src/toast.connect.ts
|
|
595
596
|
function connect(state, send, normalize) {
|
|
596
597
|
const isVisible = state.hasTag("visible");
|
package/dist/index.mjs
CHANGED
|
@@ -109,6 +109,11 @@ function warn(...a) {
|
|
|
109
109
|
// src/toast-group.connect.ts
|
|
110
110
|
import { subscribe } from "@zag-js/core";
|
|
111
111
|
|
|
112
|
+
// src/toast.anatomy.ts
|
|
113
|
+
import { createAnatomy } from "@zag-js/anatomy";
|
|
114
|
+
var anatomy = createAnatomy("toast").parts("group", "root", "title", "description", "closeTrigger");
|
|
115
|
+
var parts = anatomy.build();
|
|
116
|
+
|
|
112
117
|
// src/toast.dom.ts
|
|
113
118
|
var dom = defineDomHelpers({
|
|
114
119
|
getGroupId: (placement) => `toast-group:${placement}`,
|
|
@@ -283,6 +288,7 @@ function groupConnect(state, send, normalize) {
|
|
|
283
288
|
getGroupProps(options) {
|
|
284
289
|
const { placement, label = "Notifications" } = options;
|
|
285
290
|
return normalize.element({
|
|
291
|
+
...parts.group.attrs,
|
|
286
292
|
tabIndex: -1,
|
|
287
293
|
"aria-label": label,
|
|
288
294
|
id: dom.getGroupId(placement),
|
|
@@ -556,11 +562,6 @@ function groupMachine(userContext) {
|
|
|
556
562
|
});
|
|
557
563
|
}
|
|
558
564
|
|
|
559
|
-
// src/toast.anatomy.ts
|
|
560
|
-
import { createAnatomy } from "@zag-js/anatomy";
|
|
561
|
-
var anatomy = createAnatomy("toast").parts("root", "title", "description", "closeTrigger");
|
|
562
|
-
var parts = anatomy.build();
|
|
563
|
-
|
|
564
565
|
// src/toast.connect.ts
|
|
565
566
|
function connect(state, send, normalize) {
|
|
566
567
|
const isVisible = state.hasTag("visible");
|
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-20221209161829",
|
|
4
4
|
"description": "Core logic for the toast widget implemented as a state machine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/anatomy": "0.1.1",
|
|
33
32
|
"@zag-js/core": "0.2.2",
|
|
33
|
+
"@zag-js/anatomy": "0.1.1",
|
|
34
34
|
"@zag-js/types": "0.3.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|