@mekari/pixel3-accordion 0.0.0

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.
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/accordion.tsx
31
+ var accordion_exports = {};
32
+ __export(accordion_exports, {
33
+ MpAccordion: () => MpAccordion
34
+ });
35
+ module.exports = __toCommonJS(accordion_exports);
36
+ var import_vue = require("vue");
37
+ var accordion = __toESM(require("@zag-js/accordion"));
38
+ var import_vue2 = require("@zag-js/vue");
39
+ var import_vue3 = require("vue");
40
+ var import_recipes = require("@mekari/pixel3-styled-system/recipes");
41
+ var data = [{
42
+ title: "Watercraft",
43
+ content: "Sample accordion content"
44
+ }, {
45
+ title: "Automobiles",
46
+ content: "Sample accordion content"
47
+ }, {
48
+ title: "Aircrafts",
49
+ content: "Sample accordion content"
50
+ }];
51
+ var classNames = (0, import_recipes.accordion)();
52
+ var MpAccordion = (0, import_vue3.defineComponent)({
53
+ // eslint-disable-next-line vue/multi-word-component-names
54
+ name: "Accordion",
55
+ setup() {
56
+ const [state, send] = (0, import_vue2.useMachine)(accordion.machine({
57
+ id: "1",
58
+ multiple: true
59
+ }));
60
+ const apiRef = (0, import_vue3.computed)(() => accordion.connect(state.value, send, import_vue2.normalizeProps));
61
+ console.log(apiRef.value);
62
+ return () => {
63
+ return (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)(api.rootProps, {
64
+ "class": classNames.root
65
+ }), [data.map((item) => (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)(api.getItemProps({
66
+ value: item.title
67
+ }), {
68
+ "class": classNames.item
69
+ }), [(0, import_vue.createVNode)("button", (0, import_vue.mergeProps)(api.getItemTriggerProps({
70
+ value: item.title
71
+ }), {
72
+ "class": classNames.trigger
73
+ }), [item.title, (0, import_vue.createVNode)("div", null, [(0, import_vue.createTextVNode)("Item Indicator")])]), (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)(api.getItemContentProps({
74
+ value: item.title
75
+ }), {
76
+ "class": classNames.content
77
+ }), [(0, import_vue.createVNode)("div", null, [item.content])])]))]);
78
+ };
79
+ }
80
+ });
81
+ // Annotate the CommonJS export names for ESM import in node:
82
+ 0 && (module.exports = {
83
+ MpAccordion
84
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ MpAccordion
3
+ } from "./chunk-EJFISPTU.mjs";
4
+ export {
5
+ MpAccordion
6
+ };
@@ -0,0 +1,50 @@
1
+ // src/accordion.tsx
2
+ import { mergeProps as _mergeProps, createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue";
3
+ import * as accordion from "@zag-js/accordion";
4
+ import { normalizeProps, useMachine } from "@zag-js/vue";
5
+ import { defineComponent, computed } from "vue";
6
+ import { accordion as accordionReceipe } from "@mekari/pixel3-styled-system/recipes";
7
+ var data = [{
8
+ title: "Watercraft",
9
+ content: "Sample accordion content"
10
+ }, {
11
+ title: "Automobiles",
12
+ content: "Sample accordion content"
13
+ }, {
14
+ title: "Aircrafts",
15
+ content: "Sample accordion content"
16
+ }];
17
+ var classNames = accordionReceipe();
18
+ var MpAccordion = defineComponent({
19
+ // eslint-disable-next-line vue/multi-word-component-names
20
+ name: "Accordion",
21
+ setup() {
22
+ const [state, send] = useMachine(accordion.machine({
23
+ id: "1",
24
+ multiple: true
25
+ }));
26
+ const apiRef = computed(() => accordion.connect(state.value, send, normalizeProps));
27
+ console.log(apiRef.value);
28
+ return () => {
29
+ return _createVNode("div", _mergeProps(api.rootProps, {
30
+ "class": classNames.root
31
+ }), [data.map((item) => _createVNode("div", _mergeProps(api.getItemProps({
32
+ value: item.title
33
+ }), {
34
+ "class": classNames.item
35
+ }), [_createVNode("button", _mergeProps(api.getItemTriggerProps({
36
+ value: item.title
37
+ }), {
38
+ "class": classNames.trigger
39
+ }), [item.title, _createVNode("div", null, [_createTextVNode("Item Indicator")])]), _createVNode("div", _mergeProps(api.getItemContentProps({
40
+ value: item.title
41
+ }), {
42
+ "class": classNames.content
43
+ }), [_createVNode("div", null, [item.content])])]))]);
44
+ };
45
+ }
46
+ });
47
+
48
+ export {
49
+ MpAccordion
50
+ };
package/dist/index.js ADDED
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.tsx
31
+ var src_exports = {};
32
+ __export(src_exports, {
33
+ MpAccordion: () => MpAccordion
34
+ });
35
+ module.exports = __toCommonJS(src_exports);
36
+
37
+ // src/accordion.tsx
38
+ var import_vue = require("vue");
39
+ var accordion = __toESM(require("@zag-js/accordion"));
40
+ var import_vue2 = require("@zag-js/vue");
41
+ var import_vue3 = require("vue");
42
+ var import_recipes = require("@mekari/pixel3-styled-system/recipes");
43
+ var data = [{
44
+ title: "Watercraft",
45
+ content: "Sample accordion content"
46
+ }, {
47
+ title: "Automobiles",
48
+ content: "Sample accordion content"
49
+ }, {
50
+ title: "Aircrafts",
51
+ content: "Sample accordion content"
52
+ }];
53
+ var classNames = (0, import_recipes.accordion)();
54
+ var MpAccordion = (0, import_vue3.defineComponent)({
55
+ // eslint-disable-next-line vue/multi-word-component-names
56
+ name: "Accordion",
57
+ setup() {
58
+ const [state, send] = (0, import_vue2.useMachine)(accordion.machine({
59
+ id: "1",
60
+ multiple: true
61
+ }));
62
+ const apiRef = (0, import_vue3.computed)(() => accordion.connect(state.value, send, import_vue2.normalizeProps));
63
+ console.log(apiRef.value);
64
+ return () => {
65
+ return (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)(api.rootProps, {
66
+ "class": classNames.root
67
+ }), [data.map((item) => (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)(api.getItemProps({
68
+ value: item.title
69
+ }), {
70
+ "class": classNames.item
71
+ }), [(0, import_vue.createVNode)("button", (0, import_vue.mergeProps)(api.getItemTriggerProps({
72
+ value: item.title
73
+ }), {
74
+ "class": classNames.trigger
75
+ }), [item.title, (0, import_vue.createVNode)("div", null, [(0, import_vue.createTextVNode)("Item Indicator")])]), (0, import_vue.createVNode)("div", (0, import_vue.mergeProps)(api.getItemContentProps({
76
+ value: item.title
77
+ }), {
78
+ "class": classNames.content
79
+ }), [(0, import_vue.createVNode)("div", null, [item.content])])]))]);
80
+ };
81
+ }
82
+ });
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ MpAccordion
86
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,6 @@
1
+ import {
2
+ MpAccordion
3
+ } from "./chunk-EJFISPTU.mjs";
4
+ export {
5
+ MpAccordion
6
+ };
@@ -0,0 +1 @@
1
+ {"inputs":{"src/accordion.tsx":{"bytes":1917,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@zag-js/accordion","kind":"import-statement","external":true},{"path":"@zag-js/vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"format":"esm"},"src/index.tsx":{"bytes":1414,"imports":[{"path":"src/accordion.tsx","kind":"import-statement","original":"./accordion"}],"format":"esm"}},"outputs":{"dist/accordion.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"@zag-js/accordion","kind":"require-call","external":true},{"path":"@zag-js/vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/accordion.tsx","inputs":{"src/accordion.tsx":{"bytesInOutput":1930}},"bytes":3453},"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"@zag-js/accordion","kind":"require-call","external":true},{"path":"@zag-js/vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.tsx","inputs":{"src/index.tsx":{"bytesInOutput":127},"src/accordion.tsx":{"bytesInOutput":1785}},"bytes":3453}}}
@@ -0,0 +1 @@
1
+ {"inputs":{"src/accordion.tsx":{"bytes":1917,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@zag-js/accordion","kind":"import-statement","external":true},{"path":"@zag-js/vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"format":"esm"},"src/index.tsx":{"bytes":1414,"imports":[{"path":"src/accordion.tsx","kind":"import-statement","original":"./accordion"}],"format":"esm"}},"outputs":{"dist/accordion.mjs":{"imports":[{"path":"dist/chunk-EJFISPTU.mjs","kind":"import-statement"}],"exports":["MpAccordion"],"entryPoint":"src/accordion.tsx","inputs":{},"bytes":80},"dist/index.mjs":{"imports":[{"path":"dist/chunk-EJFISPTU.mjs","kind":"import-statement"}],"exports":["MpAccordion"],"entryPoint":"src/index.tsx","inputs":{"src/index.tsx":{"bytesInOutput":0}},"bytes":80},"dist/chunk-EJFISPTU.mjs":{"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@zag-js/accordion","kind":"import-statement","external":true},{"path":"@zag-js/vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"exports":["MpAccordion"],"inputs":{"src/accordion.tsx":{"bytesInOutput":1666}},"bytes":1714}}}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@mekari/pixel3-accordion",
3
+ "version": "0.0.0",
4
+ "license": "LGPL-3.0",
5
+ "main": "dist/index.js",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "dependencies": {
10
+ "@zag-js/accordion": "^0.26.0",
11
+ "@zag-js/vue": "^0.26.0",
12
+ "@mekari/pixel3-styled-system": "0.0.0"
13
+ },
14
+ "peerDependencies": {
15
+ "vue": "^3.3.7"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "devDependencies": {
21
+ "vue": "^3.3.7"
22
+ },
23
+ "module": "dist/index.mjs",
24
+ "types": "dist/index.d.ts",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "require": "./dist/index.js",
29
+ "default": "./dist/index.mjs"
30
+ }
31
+ },
32
+ "scripts": {
33
+ "clean": "rimraf dist .turbo",
34
+ "build": "tsup && pnpm build:types",
35
+ "build:css": "pnpm build && pnpm css:gen",
36
+ "build:fast": "tsup",
37
+ "build:types": "tsup src --dts-only",
38
+ "build:external": "tsup src/index.tsx --external @acme-org/styled-system",
39
+ "types:check": "tsc --noEmit",
40
+ "css:gen": "panda cssgen --outfile dist/styles.css",
41
+ "replace-config": "clean-package",
42
+ "restore-config": "clean-package restore"
43
+ }
44
+ }