@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.
Files changed (37) hide show
  1. package/dist/broadcast.d.mts +81 -0
  2. package/dist/broadcast.d.ts +81 -0
  3. package/dist/broadcast.js +201 -0
  4. package/dist/broadcast.mjs +11 -0
  5. package/dist/chunk-2MCZAW3F.mjs +44 -0
  6. package/dist/chunk-5IQVO6NS.mjs +40 -0
  7. package/dist/chunk-JP4CQC7M.mjs +90 -0
  8. package/dist/chunk-P5REXKKG.mjs +17 -0
  9. package/dist/chunk-PTIK2HZP.mjs +20 -0
  10. package/dist/chunk-QZ7VFGWC.mjs +6 -0
  11. package/dist/index.d.mts +5 -0
  12. package/dist/index.d.ts +5 -0
  13. package/dist/index.js +203 -0
  14. package/dist/index.mjs +11 -0
  15. package/dist/metafile-cjs.json +1 -0
  16. package/dist/metafile-esm.json +1 -0
  17. package/dist/modules/broadcast.connects.d.mts +10 -0
  18. package/dist/modules/broadcast.connects.d.ts +10 -0
  19. package/dist/modules/broadcast.connects.js +111 -0
  20. package/dist/modules/broadcast.connects.mjs +7 -0
  21. package/dist/modules/broadcast.hooks.d.mts +7 -0
  22. package/dist/modules/broadcast.hooks.d.ts +7 -0
  23. package/dist/modules/broadcast.hooks.js +123 -0
  24. package/dist/modules/broadcast.hooks.mjs +8 -0
  25. package/dist/modules/broadcast.props.d.mts +39 -0
  26. package/dist/modules/broadcast.props.d.ts +39 -0
  27. package/dist/modules/broadcast.props.js +65 -0
  28. package/dist/modules/broadcast.props.mjs +9 -0
  29. package/dist/modules/broadcast.types.d.mts +50 -0
  30. package/dist/modules/broadcast.types.d.ts +50 -0
  31. package/dist/modules/broadcast.types.js +18 -0
  32. package/dist/modules/broadcast.types.mjs +0 -0
  33. package/dist/modules/broadcast.utils.d.mts +6 -0
  34. package/dist/modules/broadcast.utils.d.ts +6 -0
  35. package/dist/modules/broadcast.utils.js +38 -0
  36. package/dist/modules/broadcast.utils.mjs +7 -0
  37. package/package.json +44 -0
@@ -0,0 +1,65 @@
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 __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/modules/broadcast.props.ts
21
+ var broadcast_props_exports = {};
22
+ __export(broadcast_props_exports, {
23
+ broadcastEmits: () => broadcastEmits,
24
+ broadcastProps: () => broadcastProps
25
+ });
26
+ module.exports = __toCommonJS(broadcast_props_exports);
27
+ var import_pixel3_utils = require("@mekari/pixel3-utils");
28
+ var broadcastProps = {
29
+ id: {
30
+ type: String
31
+ },
32
+ variant: {
33
+ type: String,
34
+ default: "announcement"
35
+ },
36
+ content: {
37
+ type: String
38
+ },
39
+ textLink: {
40
+ type: String
41
+ },
42
+ textLinkHref: {
43
+ type: String
44
+ },
45
+ iconName: {
46
+ type: String
47
+ },
48
+ textAdditionalAction: {
49
+ type: String
50
+ },
51
+ hasAdditionalAction: {
52
+ type: Boolean,
53
+ default: false
54
+ },
55
+ isClosable: {
56
+ type: Boolean,
57
+ default: false
58
+ }
59
+ };
60
+ var broadcastEmits = (0, import_pixel3_utils.declareEmit)(["click-additional-action", "click-text-link", "click-close-button"]);
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ broadcastEmits,
64
+ broadcastProps
65
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ broadcastEmits,
3
+ broadcastProps
4
+ } from "../chunk-5IQVO6NS.mjs";
5
+ import "../chunk-QZ7VFGWC.mjs";
6
+ export {
7
+ broadcastEmits,
8
+ broadcastProps
9
+ };
@@ -0,0 +1,50 @@
1
+ import { Optional, PropTypes } from '@mekari/pixel3-utils';
2
+
3
+ /**
4
+ * Exported broadcast types.
5
+ */
6
+
7
+ type BroadcastVariant = 'announcement' | 'information' | 'important';
8
+ interface BroadcastProps {
9
+ id?: string;
10
+ variant?: BroadcastVariant;
11
+ content?: string;
12
+ textLink?: string;
13
+ textLinkHref?: string;
14
+ iconName?: string;
15
+ textAdditionalAction?: string;
16
+ hasAdditionalAction?: boolean;
17
+ isClosable?: boolean;
18
+ }
19
+ type BroadcastDefinedContext = Optional<BroadcastProps, 'id'>;
20
+ interface BroadcastApiMachine<T extends PropTypes = PropTypes> {
21
+ variant?: BroadcastVariant;
22
+ iconName?: string;
23
+ content?: string;
24
+ textLink?: string;
25
+ textAdditionalAction?: string;
26
+ hasAdditionalAction?: boolean;
27
+ isClosable?: boolean;
28
+ rootProps?: T['element'];
29
+ containerProps?: T['element'];
30
+ wrapperProps?: T['element'];
31
+ iconProps?: T['element'];
32
+ contentProps?: T['element'];
33
+ textLinkProps?: T['element'];
34
+ actionProps?: T['element'];
35
+ closeProps?: T['element'];
36
+ }
37
+ interface BroadcastState extends BroadcastProps {
38
+ }
39
+ interface BroadcastClasses {
40
+ root?: string;
41
+ container?: string;
42
+ wrapper?: string;
43
+ icon?: string;
44
+ content?: string;
45
+ textLink?: string;
46
+ action?: string;
47
+ close?: string;
48
+ }
49
+
50
+ export { BroadcastApiMachine, BroadcastClasses, BroadcastDefinedContext, BroadcastProps, BroadcastState, BroadcastVariant };
@@ -0,0 +1,50 @@
1
+ import { Optional, PropTypes } from '@mekari/pixel3-utils';
2
+
3
+ /**
4
+ * Exported broadcast types.
5
+ */
6
+
7
+ type BroadcastVariant = 'announcement' | 'information' | 'important';
8
+ interface BroadcastProps {
9
+ id?: string;
10
+ variant?: BroadcastVariant;
11
+ content?: string;
12
+ textLink?: string;
13
+ textLinkHref?: string;
14
+ iconName?: string;
15
+ textAdditionalAction?: string;
16
+ hasAdditionalAction?: boolean;
17
+ isClosable?: boolean;
18
+ }
19
+ type BroadcastDefinedContext = Optional<BroadcastProps, 'id'>;
20
+ interface BroadcastApiMachine<T extends PropTypes = PropTypes> {
21
+ variant?: BroadcastVariant;
22
+ iconName?: string;
23
+ content?: string;
24
+ textLink?: string;
25
+ textAdditionalAction?: string;
26
+ hasAdditionalAction?: boolean;
27
+ isClosable?: boolean;
28
+ rootProps?: T['element'];
29
+ containerProps?: T['element'];
30
+ wrapperProps?: T['element'];
31
+ iconProps?: T['element'];
32
+ contentProps?: T['element'];
33
+ textLinkProps?: T['element'];
34
+ actionProps?: T['element'];
35
+ closeProps?: T['element'];
36
+ }
37
+ interface BroadcastState extends BroadcastProps {
38
+ }
39
+ interface BroadcastClasses {
40
+ root?: string;
41
+ container?: string;
42
+ wrapper?: string;
43
+ icon?: string;
44
+ content?: string;
45
+ textLink?: string;
46
+ action?: string;
47
+ close?: string;
48
+ }
49
+
50
+ export { BroadcastApiMachine, BroadcastClasses, BroadcastDefinedContext, BroadcastProps, BroadcastState, BroadcastVariant };
@@ -0,0 +1,18 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/modules/broadcast.types.ts
17
+ var broadcast_types_exports = {};
18
+ module.exports = __toCommonJS(broadcast_types_exports);
File without changes
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Exported broadcast utils.
3
+ */
4
+ declare const getMaxWidthContent: (hasAdditionalAction: boolean | undefined, isClosable: boolean | undefined) => string;
5
+
6
+ export { getMaxWidthContent };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Exported broadcast utils.
3
+ */
4
+ declare const getMaxWidthContent: (hasAdditionalAction: boolean | undefined, isClosable: boolean | undefined) => string;
5
+
6
+ export { getMaxWidthContent };
@@ -0,0 +1,38 @@
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.utils.ts
22
+ var broadcast_utils_exports = {};
23
+ __export(broadcast_utils_exports, {
24
+ getMaxWidthContent: () => getMaxWidthContent
25
+ });
26
+ module.exports = __toCommonJS(broadcast_utils_exports);
27
+ var getMaxWidthContent = /* @__PURE__ */ __name((hasAdditionalAction, isClosable) => {
28
+ let actionWidth = 0;
29
+ if (hasAdditionalAction)
30
+ actionWidth += 112;
31
+ if (isClosable)
32
+ actionWidth += 42;
33
+ return `calc(100% - ${actionWidth}px)`;
34
+ }, "getMaxWidthContent");
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ getMaxWidthContent
38
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ getMaxWidthContent
3
+ } from "../chunk-P5REXKKG.mjs";
4
+ import "../chunk-QZ7VFGWC.mjs";
5
+ export {
6
+ getMaxWidthContent
7
+ };
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@mekari/pixel3-broadcast",
3
+ "description": "Mekari Pixel 3 | Broadcast component is used to global information for users in the app",
4
+ "version": "0.0.1-dev.0",
5
+ "main": "dist/index.js",
6
+ "license": "MIT",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "dependencies": {
11
+ "@mekari/pixel3-button": "0.0.7-dev.0",
12
+ "@mekari/pixel3-icon": "0.0.7-dev.0",
13
+ "@mekari/pixel3-styled-system": "0.0.5-dev.0",
14
+ "@mekari/pixel3-text": "0.0.7-dev.0",
15
+ "@mekari/pixel3-utils": "0.0.4"
16
+ },
17
+ "peerDependencies": {
18
+ "vue": "^3.4.9"
19
+ },
20
+ "devDependencies": {
21
+ "vue": "^3.4.9"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "module": "dist/index.mjs",
27
+ "types": "dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "require": "./dist/index.js",
32
+ "default": "./dist/index.mjs"
33
+ }
34
+ },
35
+ "scripts": {
36
+ "clean": "rimraf dist .turbo",
37
+ "build": "tsup && pnpm build:types",
38
+ "build:fast": "tsup",
39
+ "build:types": "tsup src --dts-only",
40
+ "types:check": "tsc --noEmit",
41
+ "replace-config": "clean-package",
42
+ "restore-config": "clean-package restore"
43
+ }
44
+ }