@amsom-habitat/ui 1.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.
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # Vue 3 + Vite
2
+
3
+ This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .amsom-modal-body{max-height:80vh;overflow-y:auto}.amsom-modal-block{z-index:1000;overflow-y:auto}
package/dist/ui.js ADDED
@@ -0,0 +1,72 @@
1
+ import { resolveComponent as f, openBlock as n, createElementBlock as l, withModifiers as u, createElementVNode as s, createBlock as h, createCommentVNode as d, renderSlot as c, toDisplayString as $ } from "vue";
2
+ const r = (t, o) => {
3
+ const e = t.__vccOpts || t;
4
+ for (const [i, a] of o)
5
+ e[i] = a;
6
+ return e;
7
+ }, v = {
8
+ name: "Modal",
9
+ props: {
10
+ closeOption: {
11
+ type: Boolean,
12
+ default: !1
13
+ }
14
+ },
15
+ emits: ["close"]
16
+ }, b = { class: "container bg-white rounded-4 p-3 m-3 position-relative" }, k = { class: "amsom-modal-body" }, y = /* @__PURE__ */ s("div", { class: "mt-2" }, null, -1);
17
+ function g(t, o, e, i, a, m) {
18
+ const _ = f("font-awesome-icon");
19
+ return n(), l("div", {
20
+ class: "amsom-modal-block bg-black bg-opacity-25 position-fixed top-50 start-50 translate-middle min-vw-100 min-vh-100 d-flex justify-content-center align-items-center",
21
+ onClick: o[1] || (o[1] = u((p) => e.closeOption ? t.$emit("close") : "", ["self"]))
22
+ }, [
23
+ s("div", b, [
24
+ e.closeOption ? (n(), h(_, {
25
+ key: 0,
26
+ icon: "fa-solid fa-times",
27
+ role: "button",
28
+ class: "position-absolute top-0 end-0 m-3 translate-middle-y",
29
+ size: "lg",
30
+ onClick: o[0] || (o[0] = (p) => t.$emit("close"))
31
+ })) : d("", !0),
32
+ s("div", k, [
33
+ y,
34
+ c(t.$slots, "default")
35
+ ])
36
+ ])
37
+ ]);
38
+ }
39
+ const V = /* @__PURE__ */ r(v, [["render", g]]), C = {
40
+ name: "Card",
41
+ props: {
42
+ title: {
43
+ type: String
44
+ }
45
+ }
46
+ }, w = { class: "card" }, x = { class: "card-body" }, B = {
47
+ key: 0,
48
+ class: "card-title"
49
+ }, O = /* @__PURE__ */ s("h5", { class: "card-title" }, " Card title ", -1), S = /* @__PURE__ */ s("p", { class: "card-text" }, " Some quick example text to build on the card title and make up the bulk of the card's content. ", -1), M = /* @__PURE__ */ s("a", {
50
+ href: "#",
51
+ class: "btn btn-primary"
52
+ }, "Go somewhere", -1);
53
+ function E(t, o, e, i, a, m) {
54
+ return n(), l("div", w, [
55
+ s("div", x, [
56
+ c(t.$slots, "header", {}, () => [
57
+ e.title ? (n(), l("h4", B, $(e.title), 1)) : d("", !0)
58
+ ]),
59
+ c(t.$slots, "default", {}, () => [
60
+ O,
61
+ S,
62
+ M
63
+ ])
64
+ ])
65
+ ]);
66
+ }
67
+ const j = /* @__PURE__ */ r(C, [["render", E]]);
68
+ export {
69
+ j as Card,
70
+ V as Modal,
71
+ V as default
72
+ };
@@ -0,0 +1 @@
1
+ (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.UI={},t.Vue))})(this,function(t,e){"use strict";const c=(o,s)=>{const n=o.__vccOpts||o;for(const[l,i]of s)n[l]=i;return n},a={name:"Modal",props:{closeOption:{type:Boolean,default:!1}},emits:["close"]},r={class:"container bg-white rounded-4 p-3 m-3 position-relative"},m={class:"amsom-modal-body"},f=e.createElementVNode("div",{class:"mt-2"},null,-1);function p(o,s,n,l,i,g){const B=e.resolveComponent("font-awesome-icon");return e.openBlock(),e.createElementBlock("div",{class:"amsom-modal-block bg-black bg-opacity-25 position-fixed top-50 start-50 translate-middle min-vw-100 min-vh-100 d-flex justify-content-center align-items-center",onClick:s[1]||(s[1]=e.withModifiers(C=>n.closeOption?o.$emit("close"):"",["self"]))},[e.createElementVNode("div",r,[n.closeOption?(e.openBlock(),e.createBlock(B,{key:0,icon:"fa-solid fa-times",role:"button",class:"position-absolute top-0 end-0 m-3 translate-middle-y",size:"lg",onClick:s[0]||(s[0]=C=>o.$emit("close"))})):e.createCommentVNode("",!0),e.createElementVNode("div",m,[f,e.renderSlot(o.$slots,"default")])])])}const d=c(a,[["render",p]]),_={name:"Card",props:{title:{type:String}}},h={class:"card"},k={class:"card-body"},u={key:0,class:"card-title"},$=e.createElementVNode("h5",{class:"card-title"}," Card title ",-1),b=e.createElementVNode("p",{class:"card-text"}," Some quick example text to build on the card title and make up the bulk of the card's content. ",-1),y=e.createElementVNode("a",{href:"#",class:"btn btn-primary"},"Go somewhere",-1);function E(o,s,n,l,i,g){return e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",k,[e.renderSlot(o.$slots,"header",{},()=>[n.title?(e.openBlock(),e.createElementBlock("h4",u,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0)]),e.renderSlot(o.$slots,"default",{},()=>[$,b,y])])])}const V=c(_,[["render",E]]);t.Card=V,t.Modal=d,t.default=d,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@amsom-habitat/ui",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "vite build",
8
+ "preview": "vite preview"
9
+ },
10
+ "main": "./dist/ui.umd.js",
11
+ "module": "./dist/ui.js",
12
+ "export": {
13
+ ".": {
14
+ "import": "./dist/ui.js",
15
+ "require": "./dist/ui.umd.js"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "dependencies": {
22
+ "bootstrap": "^5.3.2",
23
+ "vue": "^3.4.18"
24
+ },
25
+ "devDependencies": {
26
+ "@vitejs/plugin-vue": "^5.0.4",
27
+ "vite": "^5.1.1"
28
+ }
29
+ }