@phila/phila-ui-callout 0.0.5

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/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # Callout component
2
+
3
+ ## Create a new local build
4
+
5
+ In src/components/COMPONENT_NAME:
6
+
7
+ ```
8
+ npm run build
9
+ npm pack
10
+ ```
11
+
12
+ copy .tgz file to project and run:
13
+
14
+ ```
15
+ npm install COMPONENT_NAME*.tgz
16
+ ```
@@ -0,0 +1,30 @@
1
+ import { defineComponent as r, computed as m, openBlock as s, createElementBlock as t, normalizeClass as d, createElementVNode as c, Fragment as a, createTextVNode as p, toDisplayString as u, renderSlot as i, createCommentVNode as f } from "vue";
2
+ const g = { class: "message-body" }, y = {
3
+ // Disabling the multi-word component name rule for this file
4
+ // to ensure component backwards compatibility.
5
+ // eslint-disable-next-line vue/multi-word-component-names
6
+ name: "Callout"
7
+ }, C = /* @__PURE__ */ r({
8
+ ...y,
9
+ props: {
10
+ message: { default: "" },
11
+ messageType: { default: "info" }
12
+ },
13
+ setup(o) {
14
+ const n = o, l = m(() => `is-${n.messageType}`);
15
+ return (e, _) => (s(), t("div", {
16
+ class: d(["message", l.value])
17
+ }, [
18
+ c("div", g, [
19
+ e.message ? (s(), t(a, { key: 0 }, [
20
+ p(u(e.message), 1)
21
+ ], 64)) : (s(), t(a, { key: 1 }, [
22
+ e.$slots.default ? i(e.$slots, "default", { key: 0 }) : f("", !0)
23
+ ], 64))
24
+ ])
25
+ ], 2));
26
+ }
27
+ });
28
+ export {
29
+ C as default
30
+ };
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t(require("vue")):typeof define=="function"&&define.amd?define(["vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,e.Callout=t(e.Vue))})(this,function(e){"use strict";const t={class:"message-body"},n={name:"Callout"};return e.defineComponent({...n,props:{message:{default:""},messageType:{default:"info"}},setup(o){const a=o,l=e.computed(()=>`is-${a.messageType}`);return(s,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["message",l.value])},[e.createElementVNode("div",t,[s.message?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.message),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.$slots.default?e.renderSlot(s.$slots,"default",{key:0}):e.createCommentVNode("",!0)],64))])],2))}})});
@@ -0,0 +1,2 @@
1
+ import Callout from "./Callout.vue";
2
+ export default Callout;
@@ -0,0 +1,6 @@
1
+ import Callout from 'Callout.vue';
2
+ declare module '@vue/runtime-core' {
3
+ interface GlobalComponents {
4
+ Callout: typeof Callout;
5
+ }
6
+ }
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@phila/phila-ui-callout",
3
+ "private": false,
4
+ "version": "0.0.5",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "./dist/callout.umd.cjs",
10
+ "module": "./dist/callout.js",
11
+ "types": "./dist/types.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": {
15
+ "types": "./dist/types.d.ts",
16
+ "default": "./dist/callout.js"
17
+ },
18
+ "require": "./dist/callout.umd.cjs"
19
+ }
20
+ },
21
+ "scripts": {
22
+ "dev": "vite",
23
+ "prepublish": "npm i && npm run build",
24
+ "build": "vite build && vue-tsc --declaration --emitDeclarationOnly --outdir ./dist",
25
+ "preview": "vite preview"
26
+ },
27
+ "dependencies": {
28
+ "@phila/phila-ui-core": "^1.0.12",
29
+ "bulma": "^0.9.4",
30
+ "vue": "^3.3.8"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^20.10.3",
34
+ "@vitejs/plugin-vue": "^4.5.0",
35
+ "sass": "^1.69.5",
36
+ "typescript": "^5.2.2",
37
+ "vite": "^5.0.0",
38
+ "vite-plugin-dts": "^3.6.4",
39
+ "vite-plugin-lib-inject-css": "^1.3.0",
40
+ "vue-tsc": "^1.8.22"
41
+ },
42
+ "publishConfig": {
43
+ "registry": "https://registry.npmjs.com/",
44
+ "access": "public"
45
+ },
46
+ "gitHead": "23f6f041d9a4577433637c7fc402beea3847a41a"
47
+ }