ablok-components 0.0.2

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,19 @@
1
+ # Vue 3 + TypeScript + Vite
2
+
3
+ This template should help get you started developing with Vue 3 and TypeScript 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)
8
+
9
+ ## Type Support For `.vue` Imports in TS
10
+
11
+ Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
12
+
13
+ 1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
14
+ 2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
15
+
16
+ You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
17
+
18
+ adapted build lib according to:
19
+ https://jivancic.com/posts/build-a-component-library.html#package-json-config
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,109 @@
1
+ import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, renderSlot } from "vue";
2
+ var baseIcon_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}\n")();
3
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4
+ __name: "base-icon",
5
+ props: {
6
+ id: {
7
+ type: String,
8
+ default: ""
9
+ },
10
+ size: {
11
+ type: String,
12
+ default: "default"
13
+ }
14
+ },
15
+ setup(__props) {
16
+ return (_ctx, _cache) => {
17
+ const _component_SvgSprite = resolveComponent("SvgSprite");
18
+ return openBlock(), createElementBlock("span", {
19
+ class: normalizeClass(["base-icon", {
20
+ [`base-icon--${__props.size}`]: __props.size
21
+ }])
22
+ }, [
23
+ createVNode(_component_SvgSprite, {
24
+ symbol: `icon-${__props.id}`,
25
+ role: "presentation"
26
+ }, null, 8, ["symbol"])
27
+ ], 2);
28
+ };
29
+ }
30
+ });
31
+ var loadingSpinner_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".loading-spinner{min-width:2rem}\n")();
32
+ const _hoisted_1$1 = { class: "loading-spinner d-block" };
33
+ const _hoisted_2$1 = { class: "loading-spinner__animation" };
34
+ const _hoisted_3 = {
35
+ class: "d-block",
36
+ version: "1.1",
37
+ id: "L9",
38
+ xmlns: "http://www.w3.org/2000/svg",
39
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
40
+ x: "0px",
41
+ y: "0px",
42
+ viewBox: "0 0 100 100",
43
+ "enable-background": "new 0 0 0 0",
44
+ "xml:space": "preserve"
45
+ };
46
+ const _hoisted_4 = ["fill"];
47
+ const _hoisted_5 = /* @__PURE__ */ createElementVNode("animateTransform", {
48
+ attributeName: "transform",
49
+ attributeType: "XML",
50
+ type: "rotate",
51
+ dur: "1s",
52
+ from: "0 50 50",
53
+ to: "360 50 50",
54
+ repeatCount: "indefinite"
55
+ }, null, -1);
56
+ const _hoisted_6 = [
57
+ _hoisted_5
58
+ ];
59
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
60
+ __name: "loading-spinner",
61
+ props: {
62
+ color: {
63
+ type: String,
64
+ default: "#fff"
65
+ }
66
+ },
67
+ setup(__props) {
68
+ return (_ctx, _cache) => {
69
+ return openBlock(), createElementBlock("span", _hoisted_1$1, [
70
+ createElementVNode("span", _hoisted_2$1, [
71
+ (openBlock(), createElementBlock("svg", _hoisted_3, [
72
+ createElementVNode("path", {
73
+ fill: __props.color,
74
+ d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
75
+ }, _hoisted_6, 8, _hoisted_4)
76
+ ]))
77
+ ]),
78
+ renderSlot(_ctx.$slots, "default")
79
+ ]);
80
+ };
81
+ }
82
+ });
83
+ var baseButton_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".base-button{appearance:none;background:none;border:none}\n")();
84
+ const _hoisted_1 = { class: "btn" };
85
+ const _hoisted_2 = ["innerHTML"];
86
+ const _sfc_main = /* @__PURE__ */ defineComponent({
87
+ __name: "base-button",
88
+ props: {
89
+ caption: {
90
+ type: String,
91
+ default: "Base Button"
92
+ },
93
+ size: {
94
+ type: String,
95
+ default: "default"
96
+ }
97
+ },
98
+ setup(__props) {
99
+ return (_ctx, _cache) => {
100
+ return openBlock(), createElementBlock("button", _hoisted_1, [
101
+ createElementVNode("span", {
102
+ class: "caption",
103
+ innerHTML: __props.caption
104
+ }, null, 8, _hoisted_2)
105
+ ]);
106
+ };
107
+ }
108
+ });
109
+ export { _sfc_main as BaseButton, _sfc_main$2 as BaseIcon, _sfc_main$1 as LoadingSpinner };
@@ -0,0 +1,4 @@
1
+ (function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.AblokComponents={},n.Vue))})(this,function(n,e){"use strict";var g=(()=>`.base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}
2
+ `)();const s=e.defineComponent({__name:"base-icon",props:{id:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(o,i)=>{const f=e.resolveComponent("SvgSprite");return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["base-icon",{[`base-icon--${t.size}`]:t.size}])},[e.createVNode(f,{symbol:`icon-${t.id}`,role:"presentation"},null,8,["symbol"])],2)}}});var h=(()=>`.loading-spinner{min-width:2rem}
3
+ `)();const a={class:"loading-spinner d-block"},r={class:"loading-spinner__animation"},l={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},c=["fill"],d=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],p=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(o,i)=>(e.openBlock(),e.createElementBlock("span",a,[e.createElementVNode("span",r,[(e.openBlock(),e.createElementBlock("svg",l,[e.createElementVNode("path",{fill:t.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},d,8,c)]))]),e.renderSlot(o.$slots,"default")]))}});var y=(()=>`.base-button{appearance:none;background:none;border:none}
4
+ `)();const _={class:"btn"},m=["innerHTML"],u=e.defineComponent({__name:"base-button",props:{caption:{type:String,default:"Base Button"},size:{type:String,default:"default"}},setup(t){return(o,i)=>(e.openBlock(),e.createElementBlock("button",_,[e.createElementVNode("span",{class:"caption",innerHTML:t.caption},null,8,m)]))}});n.BaseButton=u,n.BaseIcon=s,n.LoadingSpinner=p,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,23 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ caption: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ size: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ caption: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ size: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ }>>, {
20
+ caption: string;
21
+ size: string;
22
+ }>;
23
+ export default _default;
@@ -0,0 +1,23 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ id: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ size: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ id: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ size: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ }>>, {
20
+ size: string;
21
+ id: string;
22
+ }>;
23
+ export default _default;
@@ -0,0 +1,14 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ color: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ color: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ }>>, {
12
+ color: string;
13
+ }>;
14
+ export default _default;
Binary file
package/dist/i18n.d.ts ADDED
@@ -0,0 +1,166 @@
1
+ declare const i18n: import("vue-i18n").I18n<{
2
+ en: {
3
+ welcome: string;
4
+ common: {
5
+ id: string;
6
+ name: string;
7
+ type: string;
8
+ yes: string;
9
+ no: string;
10
+ ok: string;
11
+ all: string;
12
+ accept: string;
13
+ approve: string;
14
+ reject: string;
15
+ review: string;
16
+ featured: string;
17
+ pending: string;
18
+ cancel: string;
19
+ submit: string;
20
+ select: string;
21
+ close: string;
22
+ back: string;
23
+ prev: string;
24
+ previous: string;
25
+ next: string;
26
+ play: string;
27
+ start: string;
28
+ stop: string;
29
+ pause: string;
30
+ reset: string;
31
+ undo: string;
32
+ redo: string;
33
+ forward: string;
34
+ rewind: string;
35
+ time: string;
36
+ moves: string;
37
+ congratulations: string;
38
+ thanks: string;
39
+ participants: string;
40
+ moderate: string;
41
+ active: string;
42
+ success: string;
43
+ save: string;
44
+ or: string;
45
+ skip: string;
46
+ readMore: string;
47
+ download: string;
48
+ };
49
+ form: {
50
+ mandatoryNote: string;
51
+ consents: string;
52
+ };
53
+ consents: {
54
+ tc: string;
55
+ tos: string;
56
+ privacy: string;
57
+ thirdParty: string;
58
+ dialog: string;
59
+ };
60
+ memoryGame: {
61
+ congratulations: string;
62
+ playAgain: string;
63
+ brandLink: string;
64
+ };
65
+ cameraInput: {
66
+ waitForCameraNotification: string;
67
+ camera: string;
68
+ switch: string;
69
+ capture: string;
70
+ };
71
+ svgEditor: {};
72
+ event: {
73
+ page: string;
74
+ pages: string;
75
+ branding: string;
76
+ header: string;
77
+ footer: string;
78
+ };
79
+ fileInput: {
80
+ coverTitle: string;
81
+ coverLaunchCta: string;
82
+ coverLocalSelectTitle: string;
83
+ coverDropTarget: string;
84
+ coverLocalFileCta: string;
85
+ captureTitle: string;
86
+ reviewTitle: string;
87
+ dragDropCta: string;
88
+ selectFileDialogCta: string;
89
+ selectCameraCta: string;
90
+ dropTargetLabel: string;
91
+ shoot: string;
92
+ fileTooLarge: string;
93
+ };
94
+ editor: {
95
+ header: {
96
+ headline: string;
97
+ };
98
+ footer: {
99
+ headline: string;
100
+ };
101
+ form: {
102
+ headline: string;
103
+ };
104
+ consents: {
105
+ headline: string;
106
+ };
107
+ fields: {
108
+ headline: string;
109
+ };
110
+ };
111
+ photoBooth: {
112
+ removeBackgroundCaption: string;
113
+ saveMergedCaption: string;
114
+ };
115
+ sharing: {
116
+ bodyText: string;
117
+ facebook: string;
118
+ twitter: string;
119
+ instagram: string;
120
+ linkedin: string;
121
+ email: string;
122
+ clipboard: string;
123
+ instructions: string;
124
+ };
125
+ testing: {
126
+ headline: string;
127
+ text: string;
128
+ };
129
+ search: {
130
+ noResults: string;
131
+ };
132
+ admin: {
133
+ finder: {
134
+ title: string;
135
+ create: string;
136
+ };
137
+ event: {
138
+ create: {
139
+ title: string;
140
+ save: string;
141
+ };
142
+ edit: {
143
+ title: string;
144
+ saveAs: string;
145
+ save: string;
146
+ };
147
+ delete: {
148
+ confirmation: string;
149
+ };
150
+ lang: {
151
+ delete: {
152
+ confirmation: string;
153
+ };
154
+ };
155
+ page: {
156
+ add: string;
157
+ clone: string;
158
+ delete: {
159
+ confirmation: string;
160
+ };
161
+ };
162
+ };
163
+ };
164
+ };
165
+ }, {}, {}, string, false>;
166
+ export default i18n;
@@ -0,0 +1,3 @@
1
+ export { default as BaseIcon } from "./components/base-icon.vue";
2
+ export { default as LoadingSpinner } from "./components/loading-spinner.vue";
3
+ export { default as BaseButton } from "./components/base-button.vue";
@@ -0,0 +1,164 @@
1
+ export declare const messages: {
2
+ welcome: string;
3
+ common: {
4
+ id: string;
5
+ name: string;
6
+ type: string;
7
+ yes: string;
8
+ no: string;
9
+ ok: string;
10
+ all: string;
11
+ accept: string;
12
+ approve: string;
13
+ reject: string;
14
+ review: string;
15
+ featured: string;
16
+ pending: string;
17
+ cancel: string;
18
+ submit: string;
19
+ select: string;
20
+ close: string;
21
+ back: string;
22
+ prev: string;
23
+ previous: string;
24
+ next: string;
25
+ play: string;
26
+ start: string;
27
+ stop: string;
28
+ pause: string;
29
+ reset: string;
30
+ undo: string;
31
+ redo: string;
32
+ forward: string;
33
+ rewind: string;
34
+ time: string;
35
+ moves: string;
36
+ congratulations: string;
37
+ thanks: string;
38
+ participants: string;
39
+ moderate: string;
40
+ active: string;
41
+ success: string;
42
+ save: string;
43
+ or: string;
44
+ skip: string;
45
+ readMore: string;
46
+ download: string;
47
+ };
48
+ form: {
49
+ mandatoryNote: string;
50
+ consents: string;
51
+ };
52
+ consents: {
53
+ tc: string;
54
+ tos: string;
55
+ privacy: string;
56
+ thirdParty: string;
57
+ dialog: string;
58
+ };
59
+ memoryGame: {
60
+ congratulations: string;
61
+ playAgain: string;
62
+ brandLink: string;
63
+ };
64
+ cameraInput: {
65
+ waitForCameraNotification: string;
66
+ camera: string;
67
+ switch: string;
68
+ capture: string;
69
+ };
70
+ svgEditor: {};
71
+ event: {
72
+ page: string;
73
+ pages: string;
74
+ branding: string;
75
+ header: string;
76
+ footer: string;
77
+ };
78
+ fileInput: {
79
+ coverTitle: string;
80
+ coverLaunchCta: string;
81
+ coverLocalSelectTitle: string;
82
+ coverDropTarget: string;
83
+ coverLocalFileCta: string;
84
+ captureTitle: string;
85
+ reviewTitle: string;
86
+ dragDropCta: string;
87
+ selectFileDialogCta: string;
88
+ selectCameraCta: string;
89
+ dropTargetLabel: string;
90
+ shoot: string;
91
+ fileTooLarge: string;
92
+ };
93
+ editor: {
94
+ header: {
95
+ headline: string;
96
+ };
97
+ footer: {
98
+ headline: string;
99
+ };
100
+ form: {
101
+ headline: string;
102
+ };
103
+ consents: {
104
+ headline: string;
105
+ };
106
+ fields: {
107
+ headline: string;
108
+ };
109
+ };
110
+ photoBooth: {
111
+ removeBackgroundCaption: string;
112
+ saveMergedCaption: string;
113
+ };
114
+ sharing: {
115
+ bodyText: string;
116
+ facebook: string;
117
+ twitter: string;
118
+ instagram: string;
119
+ linkedin: string;
120
+ email: string;
121
+ clipboard: string;
122
+ instructions: string;
123
+ };
124
+ testing: {
125
+ headline: string;
126
+ text: string;
127
+ };
128
+ search: {
129
+ noResults: string;
130
+ };
131
+ admin: {
132
+ finder: {
133
+ title: string;
134
+ create: string;
135
+ };
136
+ event: {
137
+ create: {
138
+ title: string;
139
+ save: string;
140
+ };
141
+ edit: {
142
+ title: string;
143
+ saveAs: string;
144
+ save: string;
145
+ };
146
+ delete: {
147
+ confirmation: string;
148
+ };
149
+ lang: {
150
+ delete: {
151
+ confirmation: string;
152
+ };
153
+ };
154
+ page: {
155
+ add: string;
156
+ clone: string;
157
+ delete: {
158
+ confirmation: string;
159
+ };
160
+ };
161
+ };
162
+ };
163
+ };
164
+ export default messages;
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{appearance:none;background:none;border:none}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "ablok-components",
3
+ "private": false,
4
+ "version": "0.0.2",
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "vue-tsc --noEmit && vite build",
8
+ "preview": "vite preview",
9
+ "build-lib-bak": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
10
+ "build-lib": "vite build && vue-tsc --emitDeclarationOnly"
11
+ },
12
+ "dependencies": {
13
+ "ablok-components": "ablok-components-0.0.2.tgz",
14
+ "express": "^4.18.1",
15
+ "vue": "^3.2.25",
16
+ "vue-i18n": "^9.2.0-beta.36"
17
+ },
18
+ "peerDependencies": {
19
+ "vue": "^3.2.25"
20
+ },
21
+ "devDependencies": {
22
+ "@types/node": "^17.0.45",
23
+ "@vitejs/plugin-vue": "^2.3.3",
24
+ "path": "^0.12.7",
25
+ "sass": "^1.52.3",
26
+ "typescript": "^4.5.4",
27
+ "vite": "^2.9.9",
28
+ "vue-svg-sprite": "^2.2.1",
29
+ "vue-tsc": "^0.35.2"
30
+ },
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "main": "./dist/ablok-components.umd.js",
35
+ "module": "./dist/ablok-components.es.js",
36
+ "exports": {
37
+ ".": {
38
+ "import": "./dist/ablok-components.es.js",
39
+ "require": "./dist/ablok-components.umd.js"
40
+ }
41
+ },
42
+ "types": "./dist/types/index.d.ts"
43
+ }