@mekari/pixel3-broadcast 0.0.1-dev.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.
- package/dist/broadcast.d.mts +81 -0
- package/dist/broadcast.d.ts +81 -0
- package/dist/broadcast.js +201 -0
- package/dist/broadcast.mjs +11 -0
- package/dist/chunk-2MCZAW3F.mjs +44 -0
- package/dist/chunk-5IQVO6NS.mjs +40 -0
- package/dist/chunk-JP4CQC7M.mjs +90 -0
- package/dist/chunk-P5REXKKG.mjs +17 -0
- package/dist/chunk-PTIK2HZP.mjs +20 -0
- package/dist/chunk-QZ7VFGWC.mjs +6 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +203 -0
- package/dist/index.mjs +11 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/broadcast.connects.d.mts +10 -0
- package/dist/modules/broadcast.connects.d.ts +10 -0
- package/dist/modules/broadcast.connects.js +111 -0
- package/dist/modules/broadcast.connects.mjs +7 -0
- package/dist/modules/broadcast.hooks.d.mts +7 -0
- package/dist/modules/broadcast.hooks.d.ts +7 -0
- package/dist/modules/broadcast.hooks.js +123 -0
- package/dist/modules/broadcast.hooks.mjs +8 -0
- package/dist/modules/broadcast.props.d.mts +39 -0
- package/dist/modules/broadcast.props.d.ts +39 -0
- package/dist/modules/broadcast.props.js +65 -0
- package/dist/modules/broadcast.props.mjs +9 -0
- package/dist/modules/broadcast.types.d.mts +50 -0
- package/dist/modules/broadcast.types.d.ts +50 -0
- package/dist/modules/broadcast.types.js +18 -0
- package/dist/modules/broadcast.types.mjs +0 -0
- package/dist/modules/broadcast.utils.d.mts +6 -0
- package/dist/modules/broadcast.utils.d.ts +6 -0
- package/dist/modules/broadcast.utils.js +38 -0
- package/dist/modules/broadcast.utils.mjs +7 -0
- package/package.json +44 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
MpBroadcast: () => MpBroadcast
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
27
|
+
|
|
28
|
+
// src/broadcast.tsx
|
|
29
|
+
var import_vue2 = require("vue");
|
|
30
|
+
var import_vue3 = require("vue");
|
|
31
|
+
|
|
32
|
+
// src/modules/broadcast.props.ts
|
|
33
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
34
|
+
var broadcastProps = {
|
|
35
|
+
id: {
|
|
36
|
+
type: String
|
|
37
|
+
},
|
|
38
|
+
variant: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "announcement"
|
|
41
|
+
},
|
|
42
|
+
content: {
|
|
43
|
+
type: String
|
|
44
|
+
},
|
|
45
|
+
textLink: {
|
|
46
|
+
type: String
|
|
47
|
+
},
|
|
48
|
+
textLinkHref: {
|
|
49
|
+
type: String
|
|
50
|
+
},
|
|
51
|
+
iconName: {
|
|
52
|
+
type: String
|
|
53
|
+
},
|
|
54
|
+
textAdditionalAction: {
|
|
55
|
+
type: String
|
|
56
|
+
},
|
|
57
|
+
hasAdditionalAction: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
isClosable: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var broadcastEmits = (0, import_pixel3_utils.declareEmit)(["click-additional-action", "click-text-link", "click-close-button"]);
|
|
67
|
+
|
|
68
|
+
// src/modules/broadcast.hooks.ts
|
|
69
|
+
var import_vue = require("vue");
|
|
70
|
+
var import_recipes = require("@mekari/pixel3-styled-system/recipes");
|
|
71
|
+
|
|
72
|
+
// src/modules/broadcast.connects.ts
|
|
73
|
+
var import_pixel3_utils2 = require("@mekari/pixel3-utils");
|
|
74
|
+
function broadcastConnect(state, emit, classes) {
|
|
75
|
+
const {
|
|
76
|
+
id,
|
|
77
|
+
variant,
|
|
78
|
+
iconName,
|
|
79
|
+
content,
|
|
80
|
+
hasAdditionalAction,
|
|
81
|
+
isClosable,
|
|
82
|
+
textLink,
|
|
83
|
+
textLinkHref,
|
|
84
|
+
textAdditionalAction
|
|
85
|
+
} = state;
|
|
86
|
+
const idx = id != null ? id : `mp-broadcast-${(0, import_pixel3_utils2.useId)()}`;
|
|
87
|
+
return {
|
|
88
|
+
variant,
|
|
89
|
+
iconName,
|
|
90
|
+
content,
|
|
91
|
+
textLink,
|
|
92
|
+
textAdditionalAction,
|
|
93
|
+
hasAdditionalAction,
|
|
94
|
+
isClosable,
|
|
95
|
+
rootProps: {
|
|
96
|
+
id: idx,
|
|
97
|
+
class: classes.root,
|
|
98
|
+
"data-pixel-component": "MpBroadcast"
|
|
99
|
+
},
|
|
100
|
+
containerProps: {
|
|
101
|
+
id: `${idx}-container`,
|
|
102
|
+
class: classes.container,
|
|
103
|
+
"data-pixel-component": "MpBroadcastContainer"
|
|
104
|
+
},
|
|
105
|
+
wrapperProps: {
|
|
106
|
+
id: `${idx}-wrapper`,
|
|
107
|
+
class: classes.wrapper,
|
|
108
|
+
"data-pixel-component": "MpBroadcastWrapper"
|
|
109
|
+
},
|
|
110
|
+
iconProps: {
|
|
111
|
+
id: `${idx}-icon`,
|
|
112
|
+
name: iconName,
|
|
113
|
+
size: "md",
|
|
114
|
+
variant: "fill",
|
|
115
|
+
class: classes.icon,
|
|
116
|
+
"data-pixel-component": "MpBroadcastIcon"
|
|
117
|
+
},
|
|
118
|
+
contentProps: {
|
|
119
|
+
id: `${idx}-content`,
|
|
120
|
+
class: classes.content,
|
|
121
|
+
"data-pixel-component": "MpBroadcastContent"
|
|
122
|
+
},
|
|
123
|
+
textLinkProps: {
|
|
124
|
+
id: `${idx}-text-link`,
|
|
125
|
+
as: "a",
|
|
126
|
+
href: textLinkHref,
|
|
127
|
+
weight: "semiBold",
|
|
128
|
+
onClick: (evt) => emit("click-text-link", evt),
|
|
129
|
+
class: classes.textLink,
|
|
130
|
+
"data-pixel-component": "MpBroadcastTextLink"
|
|
131
|
+
},
|
|
132
|
+
actionProps: {
|
|
133
|
+
id: `${idx}-action`,
|
|
134
|
+
variant: "secondary",
|
|
135
|
+
size: "sm",
|
|
136
|
+
"aria-labelledby": textAdditionalAction,
|
|
137
|
+
onClick: (evt) => emit("click-additional-action", evt),
|
|
138
|
+
class: classes.action,
|
|
139
|
+
"data-pixel-component": "MpBroadcastAction"
|
|
140
|
+
},
|
|
141
|
+
closeProps: {
|
|
142
|
+
id: `${idx}-close`,
|
|
143
|
+
leftIcon: "close",
|
|
144
|
+
variant: "ghost",
|
|
145
|
+
size: "sm",
|
|
146
|
+
"aria-label": "Close button",
|
|
147
|
+
onClick: (evt) => emit("click-close-button", evt),
|
|
148
|
+
class: classes.close,
|
|
149
|
+
"data-pixel-component": "MpBroadcastClose"
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
__name(broadcastConnect, "broadcastConnect");
|
|
154
|
+
|
|
155
|
+
// src/modules/broadcast.hooks.ts
|
|
156
|
+
var useBroadcast = /* @__PURE__ */ __name((props, emit) => {
|
|
157
|
+
const context = (0, import_vue.ref)(props);
|
|
158
|
+
const [value] = import_recipes.broadcastSlotRecipe.splitVariantProps(context.value);
|
|
159
|
+
const classes = (0, import_recipes.broadcastSlotRecipe)(value);
|
|
160
|
+
return (0, import_vue.computed)(() => broadcastConnect(context.value, emit, classes));
|
|
161
|
+
}, "useBroadcast");
|
|
162
|
+
|
|
163
|
+
// src/modules/broadcast.utils.ts
|
|
164
|
+
var getMaxWidthContent = /* @__PURE__ */ __name((hasAdditionalAction, isClosable) => {
|
|
165
|
+
let actionWidth = 0;
|
|
166
|
+
if (hasAdditionalAction)
|
|
167
|
+
actionWidth += 112;
|
|
168
|
+
if (isClosable)
|
|
169
|
+
actionWidth += 42;
|
|
170
|
+
return `calc(100% - ${actionWidth}px)`;
|
|
171
|
+
}, "getMaxWidthContent");
|
|
172
|
+
|
|
173
|
+
// src/broadcast.tsx
|
|
174
|
+
var import_pixel3_button = require("@mekari/pixel3-button");
|
|
175
|
+
var import_pixel3_icon = require("@mekari/pixel3-icon");
|
|
176
|
+
var import_pixel3_text = require("@mekari/pixel3-text");
|
|
177
|
+
var MpBroadcast = (0, import_vue3.defineComponent)({
|
|
178
|
+
name: "MpBroadcast",
|
|
179
|
+
props: broadcastProps,
|
|
180
|
+
emits: broadcastEmits,
|
|
181
|
+
setup(props, {
|
|
182
|
+
emit
|
|
183
|
+
}) {
|
|
184
|
+
const api = useBroadcast(props, emit);
|
|
185
|
+
return () => (0, import_vue2.createVNode)("div", api.value.rootProps, [(0, import_vue2.createVNode)("div", api.value.containerProps, [(0, import_vue2.createVNode)("div", (0, import_vue2.mergeProps)({
|
|
186
|
+
"style": {
|
|
187
|
+
"--mp-broadcast--width": getMaxWidthContent(api.value.hasAdditionalAction, api.value.isClosable)
|
|
188
|
+
}
|
|
189
|
+
}, api.value.wrapperProps), [api.value.variant !== "announcement" && api.value.iconName && (0, import_vue2.createVNode)(import_pixel3_icon.MpIcon, api.value.iconProps, null), (0, import_vue2.createVNode)(import_pixel3_text.MpText, (0, import_vue2.mergeProps)(api.value.contentProps, {
|
|
190
|
+
"is-truncated": true
|
|
191
|
+
}), {
|
|
192
|
+
default: () => [api.value.content]
|
|
193
|
+
}), api.value.textLink && (0, import_vue2.createVNode)(import_pixel3_text.MpText, api.value.textLinkProps, {
|
|
194
|
+
default: () => [api.value.textLink]
|
|
195
|
+
})]), (0, import_vue2.createVNode)("div", api.value.wrapperProps, [api.value.hasAdditionalAction && (0, import_vue2.createVNode)(import_pixel3_button.MpButton, api.value.actionProps, {
|
|
196
|
+
default: () => [api.value.textAdditionalAction]
|
|
197
|
+
}), api.value.isClosable && (0, import_vue2.createVNode)(import_pixel3_button.MpButton, api.value.closeProps, null)])])]);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
201
|
+
0 && (module.exports = {
|
|
202
|
+
MpBroadcast
|
|
203
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/modules/broadcast.props.ts":{"bytes":1245,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"./broadcast.types","kind":"import-statement","external":true}],"format":"esm"},"src/modules/broadcast.connects.ts":{"bytes":2322,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"./broadcast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/broadcast.hooks.ts":{"bytes":672,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/broadcast.connects.ts","kind":"import-statement","original":"./broadcast.connects"},{"path":"./broadcast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/broadcast.utils.ts":{"bytes":389,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/broadcast.tsx":{"bytes":1777,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/broadcast.props.ts","kind":"import-statement","original":"./modules/broadcast.props"},{"path":"src/modules/broadcast.hooks.ts","kind":"import-statement","original":"./modules/broadcast.hooks"},{"path":"src/modules/broadcast.utils.ts","kind":"import-statement","original":"./modules/broadcast.utils"},{"path":"@mekari/pixel3-button","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":246,"imports":[{"path":"src/broadcast.tsx","kind":"import-statement","original":"./broadcast"}],"format":"esm"},"src/modules/broadcast.types.ts":{"bytes":1340,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/broadcast.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-button","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/broadcast.tsx","inputs":{"src/broadcast.tsx":{"bytesInOutput":1824},"src/modules/broadcast.props.ts":{"bytesInOutput":629},"src/modules/broadcast.hooks.ts":{"bytesInOutput":472},"src/modules/broadcast.connects.ts":{"bytesInOutput":2098},"src/modules/broadcast.utils.ts":{"bytesInOutput":270}},"bytes":6509},"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-button","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":127},"src/broadcast.tsx":{"bytesInOutput":1679},"src/modules/broadcast.props.ts":{"bytesInOutput":629},"src/modules/broadcast.hooks.ts":{"bytesInOutput":472},"src/modules/broadcast.connects.ts":{"bytesInOutput":2098},"src/modules/broadcast.utils.ts":{"bytesInOutput":270}},"bytes":6508},"dist/modules/broadcast.connects.js":{"imports":[{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/broadcast.connects.ts","inputs":{"src/modules/broadcast.connects.ts":{"bytesInOutput":2278}},"bytes":3315},"dist/modules/broadcast.hooks.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/broadcast.hooks.ts","inputs":{"src/modules/broadcast.hooks.ts":{"bytesInOutput":637},"src/modules/broadcast.connects.ts":{"bytesInOutput":2096}},"bytes":3836},"dist/modules/broadcast.props.js":{"imports":[{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/broadcast.props.ts","inputs":{"src/modules/broadcast.props.ts":{"bytesInOutput":838}},"bytes":1798},"dist/modules/broadcast.types.js":{"imports":[],"exports":[],"entryPoint":"src/modules/broadcast.types.ts","inputs":{"src/modules/broadcast.types.ts":{"bytesInOutput":90}},"bytes":796},"dist/modules/broadcast.utils.js":{"imports":[],"exports":[],"entryPoint":"src/modules/broadcast.utils.ts","inputs":{"src/modules/broadcast.utils.ts":{"bytesInOutput":447}},"bytes":1483}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/modules/broadcast.props.ts":{"bytes":1245,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"./broadcast.types","kind":"import-statement","external":true}],"format":"esm"},"src/modules/broadcast.connects.ts":{"bytes":2322,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"./broadcast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/broadcast.hooks.ts":{"bytes":672,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/broadcast.connects.ts","kind":"import-statement","original":"./broadcast.connects"},{"path":"./broadcast.types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/modules/broadcast.utils.ts":{"bytes":389,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/broadcast.tsx":{"bytes":1777,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"src/modules/broadcast.props.ts","kind":"import-statement","original":"./modules/broadcast.props"},{"path":"src/modules/broadcast.hooks.ts","kind":"import-statement","original":"./modules/broadcast.hooks"},{"path":"src/modules/broadcast.utils.ts","kind":"import-statement","original":"./modules/broadcast.utils"},{"path":"@mekari/pixel3-button","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":246,"imports":[{"path":"src/broadcast.tsx","kind":"import-statement","original":"./broadcast"}],"format":"esm"},"src/modules/broadcast.types.ts":{"bytes":1340,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/broadcast.mjs":{"imports":[{"path":"dist/chunk-2MCZAW3F.mjs","kind":"import-statement"},{"path":"dist/chunk-PTIK2HZP.mjs","kind":"import-statement"},{"path":"dist/chunk-JP4CQC7M.mjs","kind":"import-statement"},{"path":"dist/chunk-5IQVO6NS.mjs","kind":"import-statement"},{"path":"dist/chunk-P5REXKKG.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpBroadcast"],"entryPoint":"src/broadcast.tsx","inputs":{},"bytes":235},"dist/index.mjs":{"imports":[{"path":"dist/chunk-2MCZAW3F.mjs","kind":"import-statement"},{"path":"dist/chunk-PTIK2HZP.mjs","kind":"import-statement"},{"path":"dist/chunk-JP4CQC7M.mjs","kind":"import-statement"},{"path":"dist/chunk-5IQVO6NS.mjs","kind":"import-statement"},{"path":"dist/chunk-P5REXKKG.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpBroadcast"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":235},"dist/chunk-2MCZAW3F.mjs":{"imports":[{"path":"dist/chunk-PTIK2HZP.mjs","kind":"import-statement"},{"path":"dist/chunk-5IQVO6NS.mjs","kind":"import-statement"},{"path":"dist/chunk-P5REXKKG.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-button","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true}],"exports":["MpBroadcast"],"inputs":{"src/broadcast.tsx":{"bytesInOutput":1403}},"bytes":1643},"dist/modules/broadcast.connects.mjs":{"imports":[{"path":"dist/chunk-JP4CQC7M.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["broadcastConnect"],"entryPoint":"src/modules/broadcast.connects.ts","inputs":{},"bytes":123},"dist/modules/broadcast.hooks.mjs":{"imports":[{"path":"dist/chunk-PTIK2HZP.mjs","kind":"import-statement"},{"path":"dist/chunk-JP4CQC7M.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["useBroadcast"],"entryPoint":"src/modules/broadcast.hooks.ts","inputs":{},"bytes":147},"dist/chunk-PTIK2HZP.mjs":{"imports":[{"path":"dist/chunk-JP4CQC7M.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"exports":["useBroadcast"],"inputs":{"src/modules/broadcast.hooks.ts":{"bytesInOutput":415}},"bytes":586},"dist/chunk-JP4CQC7M.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["broadcastConnect"],"inputs":{"src/modules/broadcast.connects.ts":{"bytesInOutput":2058}},"bytes":2177},"dist/modules/broadcast.props.mjs":{"imports":[{"path":"dist/chunk-5IQVO6NS.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["broadcastEmits","broadcastProps"],"entryPoint":"src/modules/broadcast.props.ts","inputs":{},"bytes":155},"dist/chunk-5IQVO6NS.mjs":{"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["broadcastEmits","broadcastProps"],"inputs":{"src/modules/broadcast.props.ts":{"bytesInOutput":597}},"bytes":679},"dist/modules/broadcast.types.mjs":{"imports":[],"exports":[],"entryPoint":"src/modules/broadcast.types.ts","inputs":{"src/modules/broadcast.types.ts":{"bytesInOutput":0}},"bytes":0},"dist/modules/broadcast.utils.mjs":{"imports":[{"path":"dist/chunk-P5REXKKG.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["getMaxWidthContent"],"entryPoint":"src/modules/broadcast.utils.ts","inputs":{},"bytes":127},"dist/chunk-P5REXKKG.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["getMaxWidthContent"],"inputs":{"src/modules/broadcast.utils.ts":{"bytesInOutput":270}},"bytes":388},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151}}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BroadcastState, BroadcastClasses, BroadcastApiMachine } from './broadcast.types.mjs';
|
|
2
|
+
import '@mekari/pixel3-utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Exported broadcast connects.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
declare function broadcastConnect(state: BroadcastState, emit: CallableFunction, classes: BroadcastClasses): BroadcastApiMachine;
|
|
9
|
+
|
|
10
|
+
export { broadcastConnect };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BroadcastState, BroadcastClasses, BroadcastApiMachine } from './broadcast.types.js';
|
|
2
|
+
import '@mekari/pixel3-utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Exported broadcast connects.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
declare function broadcastConnect(state: BroadcastState, emit: CallableFunction, classes: BroadcastClasses): BroadcastApiMachine;
|
|
9
|
+
|
|
10
|
+
export { broadcastConnect };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/modules/broadcast.connects.ts
|
|
22
|
+
var broadcast_connects_exports = {};
|
|
23
|
+
__export(broadcast_connects_exports, {
|
|
24
|
+
broadcastConnect: () => broadcastConnect
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(broadcast_connects_exports);
|
|
27
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
28
|
+
function broadcastConnect(state, emit, classes) {
|
|
29
|
+
const {
|
|
30
|
+
id,
|
|
31
|
+
variant,
|
|
32
|
+
iconName,
|
|
33
|
+
content,
|
|
34
|
+
hasAdditionalAction,
|
|
35
|
+
isClosable,
|
|
36
|
+
textLink,
|
|
37
|
+
textLinkHref,
|
|
38
|
+
textAdditionalAction
|
|
39
|
+
} = state;
|
|
40
|
+
const idx = id != null ? id : `mp-broadcast-${(0, import_pixel3_utils.useId)()}`;
|
|
41
|
+
return {
|
|
42
|
+
variant,
|
|
43
|
+
iconName,
|
|
44
|
+
content,
|
|
45
|
+
textLink,
|
|
46
|
+
textAdditionalAction,
|
|
47
|
+
hasAdditionalAction,
|
|
48
|
+
isClosable,
|
|
49
|
+
rootProps: {
|
|
50
|
+
id: idx,
|
|
51
|
+
class: classes.root,
|
|
52
|
+
"data-pixel-component": "MpBroadcast"
|
|
53
|
+
},
|
|
54
|
+
containerProps: {
|
|
55
|
+
id: `${idx}-container`,
|
|
56
|
+
class: classes.container,
|
|
57
|
+
"data-pixel-component": "MpBroadcastContainer"
|
|
58
|
+
},
|
|
59
|
+
wrapperProps: {
|
|
60
|
+
id: `${idx}-wrapper`,
|
|
61
|
+
class: classes.wrapper,
|
|
62
|
+
"data-pixel-component": "MpBroadcastWrapper"
|
|
63
|
+
},
|
|
64
|
+
iconProps: {
|
|
65
|
+
id: `${idx}-icon`,
|
|
66
|
+
name: iconName,
|
|
67
|
+
size: "md",
|
|
68
|
+
variant: "fill",
|
|
69
|
+
class: classes.icon,
|
|
70
|
+
"data-pixel-component": "MpBroadcastIcon"
|
|
71
|
+
},
|
|
72
|
+
contentProps: {
|
|
73
|
+
id: `${idx}-content`,
|
|
74
|
+
class: classes.content,
|
|
75
|
+
"data-pixel-component": "MpBroadcastContent"
|
|
76
|
+
},
|
|
77
|
+
textLinkProps: {
|
|
78
|
+
id: `${idx}-text-link`,
|
|
79
|
+
as: "a",
|
|
80
|
+
href: textLinkHref,
|
|
81
|
+
weight: "semiBold",
|
|
82
|
+
onClick: (evt) => emit("click-text-link", evt),
|
|
83
|
+
class: classes.textLink,
|
|
84
|
+
"data-pixel-component": "MpBroadcastTextLink"
|
|
85
|
+
},
|
|
86
|
+
actionProps: {
|
|
87
|
+
id: `${idx}-action`,
|
|
88
|
+
variant: "secondary",
|
|
89
|
+
size: "sm",
|
|
90
|
+
"aria-labelledby": textAdditionalAction,
|
|
91
|
+
onClick: (evt) => emit("click-additional-action", evt),
|
|
92
|
+
class: classes.action,
|
|
93
|
+
"data-pixel-component": "MpBroadcastAction"
|
|
94
|
+
},
|
|
95
|
+
closeProps: {
|
|
96
|
+
id: `${idx}-close`,
|
|
97
|
+
leftIcon: "close",
|
|
98
|
+
variant: "ghost",
|
|
99
|
+
size: "sm",
|
|
100
|
+
"aria-label": "Close button",
|
|
101
|
+
onClick: (evt) => emit("click-close-button", evt),
|
|
102
|
+
class: classes.close,
|
|
103
|
+
"data-pixel-component": "MpBroadcastClose"
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
__name(broadcastConnect, "broadcastConnect");
|
|
108
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
109
|
+
0 && (module.exports = {
|
|
110
|
+
broadcastConnect
|
|
111
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { BroadcastDefinedContext, BroadcastApiMachine } from './broadcast.types.mjs';
|
|
3
|
+
import * as _mekari_pixel3_utils from '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
declare const useBroadcast: (props: BroadcastDefinedContext, emit: CallableFunction) => vue.ComputedRef<BroadcastApiMachine<_mekari_pixel3_utils.PropTypes>>;
|
|
6
|
+
|
|
7
|
+
export { useBroadcast };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { BroadcastDefinedContext, BroadcastApiMachine } from './broadcast.types.js';
|
|
3
|
+
import * as _mekari_pixel3_utils from '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
declare const useBroadcast: (props: BroadcastDefinedContext, emit: CallableFunction) => vue.ComputedRef<BroadcastApiMachine<_mekari_pixel3_utils.PropTypes>>;
|
|
6
|
+
|
|
7
|
+
export { useBroadcast };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/modules/broadcast.hooks.ts
|
|
22
|
+
var broadcast_hooks_exports = {};
|
|
23
|
+
__export(broadcast_hooks_exports, {
|
|
24
|
+
useBroadcast: () => useBroadcast
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(broadcast_hooks_exports);
|
|
27
|
+
var import_vue = require("vue");
|
|
28
|
+
var import_recipes = require("@mekari/pixel3-styled-system/recipes");
|
|
29
|
+
|
|
30
|
+
// src/modules/broadcast.connects.ts
|
|
31
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
32
|
+
function broadcastConnect(state, emit, classes) {
|
|
33
|
+
const {
|
|
34
|
+
id,
|
|
35
|
+
variant,
|
|
36
|
+
iconName,
|
|
37
|
+
content,
|
|
38
|
+
hasAdditionalAction,
|
|
39
|
+
isClosable,
|
|
40
|
+
textLink,
|
|
41
|
+
textLinkHref,
|
|
42
|
+
textAdditionalAction
|
|
43
|
+
} = state;
|
|
44
|
+
const idx = id != null ? id : `mp-broadcast-${(0, import_pixel3_utils.useId)()}`;
|
|
45
|
+
return {
|
|
46
|
+
variant,
|
|
47
|
+
iconName,
|
|
48
|
+
content,
|
|
49
|
+
textLink,
|
|
50
|
+
textAdditionalAction,
|
|
51
|
+
hasAdditionalAction,
|
|
52
|
+
isClosable,
|
|
53
|
+
rootProps: {
|
|
54
|
+
id: idx,
|
|
55
|
+
class: classes.root,
|
|
56
|
+
"data-pixel-component": "MpBroadcast"
|
|
57
|
+
},
|
|
58
|
+
containerProps: {
|
|
59
|
+
id: `${idx}-container`,
|
|
60
|
+
class: classes.container,
|
|
61
|
+
"data-pixel-component": "MpBroadcastContainer"
|
|
62
|
+
},
|
|
63
|
+
wrapperProps: {
|
|
64
|
+
id: `${idx}-wrapper`,
|
|
65
|
+
class: classes.wrapper,
|
|
66
|
+
"data-pixel-component": "MpBroadcastWrapper"
|
|
67
|
+
},
|
|
68
|
+
iconProps: {
|
|
69
|
+
id: `${idx}-icon`,
|
|
70
|
+
name: iconName,
|
|
71
|
+
size: "md",
|
|
72
|
+
variant: "fill",
|
|
73
|
+
class: classes.icon,
|
|
74
|
+
"data-pixel-component": "MpBroadcastIcon"
|
|
75
|
+
},
|
|
76
|
+
contentProps: {
|
|
77
|
+
id: `${idx}-content`,
|
|
78
|
+
class: classes.content,
|
|
79
|
+
"data-pixel-component": "MpBroadcastContent"
|
|
80
|
+
},
|
|
81
|
+
textLinkProps: {
|
|
82
|
+
id: `${idx}-text-link`,
|
|
83
|
+
as: "a",
|
|
84
|
+
href: textLinkHref,
|
|
85
|
+
weight: "semiBold",
|
|
86
|
+
onClick: (evt) => emit("click-text-link", evt),
|
|
87
|
+
class: classes.textLink,
|
|
88
|
+
"data-pixel-component": "MpBroadcastTextLink"
|
|
89
|
+
},
|
|
90
|
+
actionProps: {
|
|
91
|
+
id: `${idx}-action`,
|
|
92
|
+
variant: "secondary",
|
|
93
|
+
size: "sm",
|
|
94
|
+
"aria-labelledby": textAdditionalAction,
|
|
95
|
+
onClick: (evt) => emit("click-additional-action", evt),
|
|
96
|
+
class: classes.action,
|
|
97
|
+
"data-pixel-component": "MpBroadcastAction"
|
|
98
|
+
},
|
|
99
|
+
closeProps: {
|
|
100
|
+
id: `${idx}-close`,
|
|
101
|
+
leftIcon: "close",
|
|
102
|
+
variant: "ghost",
|
|
103
|
+
size: "sm",
|
|
104
|
+
"aria-label": "Close button",
|
|
105
|
+
onClick: (evt) => emit("click-close-button", evt),
|
|
106
|
+
class: classes.close,
|
|
107
|
+
"data-pixel-component": "MpBroadcastClose"
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
__name(broadcastConnect, "broadcastConnect");
|
|
112
|
+
|
|
113
|
+
// src/modules/broadcast.hooks.ts
|
|
114
|
+
var useBroadcast = /* @__PURE__ */ __name((props, emit) => {
|
|
115
|
+
const context = (0, import_vue.ref)(props);
|
|
116
|
+
const [value] = import_recipes.broadcastSlotRecipe.splitVariantProps(context.value);
|
|
117
|
+
const classes = (0, import_recipes.broadcastSlotRecipe)(value);
|
|
118
|
+
return (0, import_vue.computed)(() => broadcastConnect(context.value, emit, classes));
|
|
119
|
+
}, "useBroadcast");
|
|
120
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
121
|
+
0 && (module.exports = {
|
|
122
|
+
useBroadcast
|
|
123
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BroadcastVariant } from './broadcast.types.mjs';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
declare const broadcastProps: {
|
|
6
|
+
id: {
|
|
7
|
+
type: PropType<string | undefined>;
|
|
8
|
+
};
|
|
9
|
+
variant: {
|
|
10
|
+
type: PropType<BroadcastVariant | undefined>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
content: {
|
|
14
|
+
type: PropType<string | undefined>;
|
|
15
|
+
};
|
|
16
|
+
textLink: {
|
|
17
|
+
type: PropType<string | undefined>;
|
|
18
|
+
};
|
|
19
|
+
textLinkHref: {
|
|
20
|
+
type: PropType<string | undefined>;
|
|
21
|
+
};
|
|
22
|
+
iconName: {
|
|
23
|
+
type: PropType<string | undefined>;
|
|
24
|
+
};
|
|
25
|
+
textAdditionalAction: {
|
|
26
|
+
type: PropType<string | undefined>;
|
|
27
|
+
};
|
|
28
|
+
hasAdditionalAction: {
|
|
29
|
+
type: PropType<boolean | undefined>;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
isClosable: {
|
|
33
|
+
type: PropType<boolean | undefined>;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
declare const broadcastEmits: ("click-additional-action" | "click-text-link" | "click-close-button")[];
|
|
38
|
+
|
|
39
|
+
export { broadcastEmits, broadcastProps };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BroadcastVariant } from './broadcast.types.js';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
declare const broadcastProps: {
|
|
6
|
+
id: {
|
|
7
|
+
type: PropType<string | undefined>;
|
|
8
|
+
};
|
|
9
|
+
variant: {
|
|
10
|
+
type: PropType<BroadcastVariant | undefined>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
content: {
|
|
14
|
+
type: PropType<string | undefined>;
|
|
15
|
+
};
|
|
16
|
+
textLink: {
|
|
17
|
+
type: PropType<string | undefined>;
|
|
18
|
+
};
|
|
19
|
+
textLinkHref: {
|
|
20
|
+
type: PropType<string | undefined>;
|
|
21
|
+
};
|
|
22
|
+
iconName: {
|
|
23
|
+
type: PropType<string | undefined>;
|
|
24
|
+
};
|
|
25
|
+
textAdditionalAction: {
|
|
26
|
+
type: PropType<string | undefined>;
|
|
27
|
+
};
|
|
28
|
+
hasAdditionalAction: {
|
|
29
|
+
type: PropType<boolean | undefined>;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
isClosable: {
|
|
33
|
+
type: PropType<boolean | undefined>;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
declare const broadcastEmits: ("click-additional-action" | "click-text-link" | "click-close-button")[];
|
|
38
|
+
|
|
39
|
+
export { broadcastEmits, broadcastProps };
|