cleek 1.1.4 → 1.1.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/.vscode/extensions.json +3 -0
- package/README.md +11 -0
- package/config.vite.js +11 -0
- package/index.html +13 -0
- package/package.json +10 -65
- package/public/favicon.ico +0 -0
- package/src/App.vue +25 -0
- package/src/assets/logo.png +0 -0
- package/src/env.d.ts +8 -0
- package/src/lib-components/HelloWorld.vue +52 -0
- package/src/lib-components/ck-button.vue +4 -1
- package/src/lib-components/functions.ts +12 -0
- package/src/lib-components/index.ts +9 -0
- package/src/main.ts +27 -0
- package/tsconfig.json +15 -0
- package/vite.config.ts +14 -0
- package/dist/cleek.esm.js +0 -239
- package/dist/cleek.min.js +0 -1
- package/dist/cleek.ssr.js +0 -283
- package/dist/styles/ck-button.css +0 -132
- package/dist/styles/globalStyle.css +0 -110
- package/dist/styles/templateStyle.css +0 -0
- package/dist/styles/test.css +0 -3
- package/dist/types/src/entry.esm.d.ts +0 -4
- package/dist/types/src/lib-components/cleek-sample.vue.d.ts +0 -16
- package/dist/types/src/lib-components/functions.d.ts +0 -8
- package/dist/types/src/lib-components/index.d.ts +0 -2
- package/src/lib-components/ck-icon.vue +0 -61
- package/src/lib-components/ck-input-text.vue +0 -59
- package/src/lib-components/ck-label.vue +0 -41
- package/src/lib-components/ck-select.vue +0 -131
- package/src/lib-components/ck-switch.vue +0 -73
- package/src/lib-components/ck-textarea.vue +0 -40
- package/src/lib-components/cleek-sample.vue +0 -88
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.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 `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.
|
package/config.vite.js
ADDED
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" href="/favicon.ico" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite App</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,74 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cleek",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/cleek.ssr.js",
|
|
6
|
-
"browser": "dist/cleek.esm.js",
|
|
7
|
-
"module": "dist/cleek.esm.js",
|
|
8
|
-
"unpkg": "dist/cleek.min.js",
|
|
9
|
-
"types": "dist/types/src/entry.esm.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist/*",
|
|
12
|
-
"src/**/*.vue"
|
|
13
|
-
],
|
|
14
|
-
"sideEffects": false,
|
|
3
|
+
"version": "1.1.5",
|
|
15
4
|
"scripts": {
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",
|
|
20
|
-
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
|
|
21
|
-
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife",
|
|
22
|
-
"postbuild": "rimraf ./dist/types/dev ./dist/types/src/entry.d.ts",
|
|
23
|
-
"watch-styles": "stylus -w src/styles/ -o dist/styles",
|
|
24
|
-
"build-styles": "stylus src/styles/ -o dist/styles/"
|
|
5
|
+
"dev": "vite",
|
|
6
|
+
"build": "vue-tsc --noEmit && vite build",
|
|
7
|
+
"preview": "vite preview"
|
|
25
8
|
},
|
|
26
9
|
"dependencies": {
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"@fortawesome/free-regular-svg-icons": "^5.15.4",
|
|
30
|
-
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
|
31
|
-
"@fortawesome/vue-fontawesome": "^3.0.0-4",
|
|
32
|
-
"rollup-plugin-pug": "^1.1.1",
|
|
33
|
-
"vue-select": "^4.0.0-beta.1"
|
|
10
|
+
"path": "^0.12.7",
|
|
11
|
+
"vue": "^3.2.25"
|
|
34
12
|
},
|
|
35
13
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"@rollup/plugin-babel": "^5.3.0",
|
|
41
|
-
"@rollup/plugin-commonjs": "^14.0.0",
|
|
42
|
-
"@rollup/plugin-node-resolve": "^9.0.0",
|
|
43
|
-
"@rollup/plugin-replace": "^2.4.2",
|
|
44
|
-
"@vue/cli-plugin-babel": "^4.5.13",
|
|
45
|
-
"@vue/cli-plugin-typescript": "^4.5.13",
|
|
46
|
-
"@vue/cli-service": "^4.5.13",
|
|
47
|
-
"@vue/compiler-sfc": "^3.0.11",
|
|
48
|
-
"@zerollup/ts-transform-paths": "^1.7.18",
|
|
49
|
-
"cross-env": "^7.0.3",
|
|
50
|
-
"minimist": "^1.2.5",
|
|
51
|
-
"postcss": "^8.2.10",
|
|
52
|
-
"pug": "^3.0.2",
|
|
53
|
-
"pug-plain-loader": "^1.1.0",
|
|
54
|
-
"rimraf": "^3.0.2",
|
|
55
|
-
"rollup": "^2.52.8",
|
|
56
|
-
"rollup-plugin-postcss": "^4.0.0",
|
|
57
|
-
"rollup-plugin-stylus-compiler": "^1.0.1",
|
|
58
|
-
"rollup-plugin-stylus-css-modules": "^1.5.0",
|
|
59
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
60
|
-
"rollup-plugin-typescript2": "^0.30.0",
|
|
61
|
-
"rollup-plugin-vue": "^6.0.0",
|
|
62
|
-
"stylus": "^0.56.0",
|
|
63
|
-
"stylus-loader": "^3.0.2",
|
|
64
|
-
"ttypescript": "^1.5.12",
|
|
65
|
-
"typescript": "^4.0.3",
|
|
66
|
-
"vue": "^3.0.5"
|
|
67
|
-
},
|
|
68
|
-
"peerDependencies": {
|
|
69
|
-
"vue": "^3.0.5"
|
|
70
|
-
},
|
|
71
|
-
"engines": {
|
|
72
|
-
"node": ">=12"
|
|
14
|
+
"@vitejs/plugin-vue": "^2.0.0",
|
|
15
|
+
"typescript": "^4.4.4",
|
|
16
|
+
"vite": "^2.7.2",
|
|
17
|
+
"vue-tsc": "^0.29.8"
|
|
73
18
|
}
|
|
74
19
|
}
|
|
Binary file
|
package/src/App.vue
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<img alt="Vue logo" src="./assets/logo.png" />
|
|
3
|
+
<HelloWorld msg="Hello Vue 3 + TypeScript + Vite" />
|
|
4
|
+
<ck-button>
|
|
5
|
+
Lisandrito
|
|
6
|
+
</ck-button>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
// This starter template is using Vue 3 <script setup> SFCs
|
|
11
|
+
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
|
|
12
|
+
import HelloWorld from './lib-components/HelloWorld.vue';
|
|
13
|
+
import CkButton from './lib-components/ck-Button.vue';
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
#app {
|
|
18
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
19
|
+
-webkit-font-smoothing: antialiased;
|
|
20
|
+
-moz-osx-font-smoothing: grayscale;
|
|
21
|
+
text-align: center;
|
|
22
|
+
color: #2c3e50;
|
|
23
|
+
margin-top: 60px;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
Binary file
|
package/src/env.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import { DefineComponent } from 'vue'
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
6
|
+
const component: DefineComponent<{}, {}, any>
|
|
7
|
+
export default component
|
|
8
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
defineProps<{ msg: string }>()
|
|
5
|
+
|
|
6
|
+
const count = ref(0)
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<h1>{{ msg }}</h1>
|
|
11
|
+
|
|
12
|
+
<p>
|
|
13
|
+
Recommended IDE setup:
|
|
14
|
+
<a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
|
|
15
|
+
+
|
|
16
|
+
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p>See <code>README.md</code> for more information.</p>
|
|
20
|
+
|
|
21
|
+
<p>
|
|
22
|
+
<a href="https://vitejs.dev/guide/features.html" target="_blank">
|
|
23
|
+
Vite Docs
|
|
24
|
+
</a>
|
|
25
|
+
|
|
|
26
|
+
<a href="https://v3.vuejs.org/" target="_blank">Vue 3 Docs</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<button type="button" @click="count++">count is: {{ count }}</button>
|
|
30
|
+
<p>
|
|
31
|
+
Edit
|
|
32
|
+
<code>components/HelloWorld.vue</code> to test hot module replacement.
|
|
33
|
+
</p>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<style scoped>
|
|
37
|
+
a {
|
|
38
|
+
color: #42b983;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
label {
|
|
42
|
+
margin: 0 0.5em;
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
code {
|
|
47
|
+
background-color: #eee;
|
|
48
|
+
padding: 2px 4px;
|
|
49
|
+
border-radius: 4px;
|
|
50
|
+
color: #304455;
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
:class="computedClass"
|
|
6
6
|
@click="$emit('click', $event)"
|
|
7
7
|
)
|
|
8
|
+
| ck button
|
|
8
9
|
//- icon left
|
|
9
10
|
//- ck-icon.ck-button--icon-left(
|
|
10
11
|
//- v-if="icon"
|
|
@@ -62,5 +63,7 @@ export default {
|
|
|
62
63
|
</script>
|
|
63
64
|
|
|
64
65
|
<style scoped>
|
|
65
|
-
|
|
66
|
+
.ck-button > button {
|
|
67
|
+
background-color: red !important;
|
|
68
|
+
}
|
|
66
69
|
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
getGroupClass({ group = '', groupVertical = '', groupBreak = '' } = {}) {
|
|
3
|
+
const _screenSize = '';
|
|
4
|
+
if (groupBreak && groupBreak === _screenSize) return [];
|
|
5
|
+
const classList: string[] = [];
|
|
6
|
+
// group
|
|
7
|
+
if (group) classList.push(`ck-component__group--${group}`);
|
|
8
|
+
// groupVertical
|
|
9
|
+
if (groupVertical) classList.push(`ck-component__group-vertical--${groupVertical}`);
|
|
10
|
+
return classList;
|
|
11
|
+
},
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
// export { default as CleekSample } from './cleek-sample.vue';
|
|
3
|
+
|
|
4
|
+
export { default as CkButton } from './ck-button.vue';
|
|
5
|
+
// export { default as CkIcon } from './ck-icon.vue';
|
|
6
|
+
// export { default as CkInputText } from './ck-input-text.vue';
|
|
7
|
+
// export { default as CkLabel } from './ck-label.vue';
|
|
8
|
+
// export { default as CkTextarea } from './ck-textarea.vue';
|
|
9
|
+
// export { default as CkSelect } from './ck-select.vue';
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { App, Plugin } from 'vue';
|
|
2
|
+
// vue components
|
|
3
|
+
import * as components from './lib-components/index';
|
|
4
|
+
|
|
5
|
+
// install function executed by Vue.use()
|
|
6
|
+
const install: Exclude<Plugin['install'], undefined> = function installCleek(app: App, options: any) {
|
|
7
|
+
console.log('arranco paquete');
|
|
8
|
+
console.log('options', options);
|
|
9
|
+
|
|
10
|
+
// vue components
|
|
11
|
+
Object.entries(components).forEach(([componentName, component]) => {
|
|
12
|
+
app.component(componentName, component);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// Create module definition for Vue.use()
|
|
17
|
+
export default install;
|
|
18
|
+
|
|
19
|
+
// To allow individual component use, export components
|
|
20
|
+
// each can be registered via Vue.component()
|
|
21
|
+
export * from './lib-components/index';
|
|
22
|
+
|
|
23
|
+
// comentar esto al hacer el build
|
|
24
|
+
import { createApp } from 'vue'
|
|
25
|
+
import AppIt from './App.vue'
|
|
26
|
+
|
|
27
|
+
createApp(AppIt).mount('#app')
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"jsx": "preserve",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"lib": ["esnext", "dom"]
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
|
|
15
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
// https://vitejs.dev/config/
|
|
6
|
+
module.exports = defineConfig({
|
|
7
|
+
plugins: [vue()],
|
|
8
|
+
build: {
|
|
9
|
+
lib: {
|
|
10
|
+
entry: path.resolve(__dirname, 'src/main.ts'),
|
|
11
|
+
name: 'MyCssLib',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
package/dist/cleek.esm.js
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, normalizeClass, renderSlot } from 'vue';
|
|
2
|
-
|
|
3
|
-
var script$1 = /*#__PURE__*/defineComponent({
|
|
4
|
-
name: 'CleekSample',
|
|
5
|
-
|
|
6
|
-
data() {
|
|
7
|
-
return {
|
|
8
|
-
counter: 5,
|
|
9
|
-
initCounter: 5,
|
|
10
|
-
message: {
|
|
11
|
-
action: null,
|
|
12
|
-
amount: null
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
computed: {
|
|
18
|
-
changedBy() {
|
|
19
|
-
const {
|
|
20
|
-
message
|
|
21
|
-
} = this;
|
|
22
|
-
if (!message.action) return 'initialized';
|
|
23
|
-
return `${message.action} ${message.amount || ''}`.trim();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
methods: {
|
|
28
|
-
increment(arg) {
|
|
29
|
-
const amount = typeof arg !== 'number' ? 1 : arg;
|
|
30
|
-
this.counter += amount;
|
|
31
|
-
this.message.action = 'incremented by';
|
|
32
|
-
this.message.amount = amount;
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
decrement(arg) {
|
|
36
|
-
const amount = typeof arg !== 'number' ? 1 : arg;
|
|
37
|
-
this.counter -= amount;
|
|
38
|
-
this.message.action = 'decremented by';
|
|
39
|
-
this.message.amount = amount;
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
reset() {
|
|
43
|
-
this.counter = this.initCounter;
|
|
44
|
-
this.message.action = 'reset';
|
|
45
|
-
this.message.amount = null;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const _hoisted_1$1 = {
|
|
52
|
-
class: "cleek-sample"
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const _hoisted_2 = /*#__PURE__*/createTextVNode(".");
|
|
56
|
-
|
|
57
|
-
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("p", null, [createTextVNode("The counter was " + toDisplayString(_ctx.changedBy) + " to ", 1), createElementVNode("b", null, toDisplayString(_ctx.counter), 1), _hoisted_2]), createElementVNode("button", {
|
|
59
|
-
onClick: _cache[0] || (_cache[0] = function () {
|
|
60
|
-
return _ctx.increment && _ctx.increment(...arguments);
|
|
61
|
-
})
|
|
62
|
-
}, " Click +1 "), createElementVNode("button", {
|
|
63
|
-
onClick: _cache[1] || (_cache[1] = function () {
|
|
64
|
-
return _ctx.decrement && _ctx.decrement(...arguments);
|
|
65
|
-
})
|
|
66
|
-
}, " Click -1 "), createElementVNode("button", {
|
|
67
|
-
onClick: _cache[2] || (_cache[2] = $event => _ctx.increment(5))
|
|
68
|
-
}, " Click +5 "), createElementVNode("button", {
|
|
69
|
-
onClick: _cache[3] || (_cache[3] = $event => _ctx.decrement(5))
|
|
70
|
-
}, " Click -5 "), createElementVNode("button", {
|
|
71
|
-
onClick: _cache[4] || (_cache[4] = function () {
|
|
72
|
-
return _ctx.reset && _ctx.reset(...arguments);
|
|
73
|
-
})
|
|
74
|
-
}, " Reset ")]);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function styleInject(css, ref) {
|
|
78
|
-
if ( ref === void 0 ) ref = {};
|
|
79
|
-
var insertAt = ref.insertAt;
|
|
80
|
-
|
|
81
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
82
|
-
|
|
83
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
84
|
-
var style = document.createElement('style');
|
|
85
|
-
style.type = 'text/css';
|
|
86
|
-
|
|
87
|
-
if (insertAt === 'top') {
|
|
88
|
-
if (head.firstChild) {
|
|
89
|
-
head.insertBefore(style, head.firstChild);
|
|
90
|
-
} else {
|
|
91
|
-
head.appendChild(style);
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
head.appendChild(style);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (style.styleSheet) {
|
|
98
|
-
style.styleSheet.cssText = css;
|
|
99
|
-
} else {
|
|
100
|
-
style.appendChild(document.createTextNode(css));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
var css_248z$1 = "\n.cleek-sample[data-v-0917b8aa] {\n display: block;\n width: 400px;\n margin: 25px auto;\n border: 1px solid #ccc;\n background: #eaeaea;\n text-align: center;\n padding: 25px;\n}\n.cleek-sample p[data-v-0917b8aa] {\n margin: 0 0 1em;\n}\n";
|
|
105
|
-
styleInject(css_248z$1);
|
|
106
|
-
|
|
107
|
-
script$1.render = render$1;
|
|
108
|
-
script$1.__scopeId = "data-v-0917b8aa";
|
|
109
|
-
|
|
110
|
-
var functions = {
|
|
111
|
-
getGroupClass() {
|
|
112
|
-
let {
|
|
113
|
-
group = '',
|
|
114
|
-
groupVertical = '',
|
|
115
|
-
groupBreak = ''
|
|
116
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
117
|
-
const _screenSize = '';
|
|
118
|
-
if (groupBreak && groupBreak === _screenSize) return [];
|
|
119
|
-
const classList = []; // group
|
|
120
|
-
|
|
121
|
-
if (group) classList.push(`ck-component__group--${group}`); // groupVertical
|
|
122
|
-
|
|
123
|
-
if (groupVertical) classList.push(`ck-component__group-vertical--${groupVertical}`);
|
|
124
|
-
return classList;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
var script = {
|
|
130
|
-
props: {
|
|
131
|
-
type: {
|
|
132
|
-
type: String,
|
|
133
|
-
default: ''
|
|
134
|
-
},
|
|
135
|
-
// outlined || filled
|
|
136
|
-
color: {
|
|
137
|
-
type: String,
|
|
138
|
-
default: ''
|
|
139
|
-
},
|
|
140
|
-
// icon
|
|
141
|
-
icon: {
|
|
142
|
-
type: [String, Array],
|
|
143
|
-
default: ''
|
|
144
|
-
},
|
|
145
|
-
'icon-package': {
|
|
146
|
-
type: String,
|
|
147
|
-
default: ''
|
|
148
|
-
},
|
|
149
|
-
'icon-right': {
|
|
150
|
-
type: String,
|
|
151
|
-
default: ''
|
|
152
|
-
},
|
|
153
|
-
// label
|
|
154
|
-
label: {
|
|
155
|
-
type: String,
|
|
156
|
-
default: ''
|
|
157
|
-
},
|
|
158
|
-
'label-align': {
|
|
159
|
-
type: String,
|
|
160
|
-
default: ''
|
|
161
|
-
},
|
|
162
|
-
// group
|
|
163
|
-
group: {
|
|
164
|
-
type: String,
|
|
165
|
-
default: ''
|
|
166
|
-
},
|
|
167
|
-
groupBreak: {
|
|
168
|
-
type: String,
|
|
169
|
-
default: 's'
|
|
170
|
-
},
|
|
171
|
-
groupVertical: {
|
|
172
|
-
type: String,
|
|
173
|
-
default: ''
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
computed: {
|
|
177
|
-
computedClass() {
|
|
178
|
-
const classList = []; // group
|
|
179
|
-
|
|
180
|
-
classList.push(functions.getGroupClass(this)); // color
|
|
181
|
-
|
|
182
|
-
if (this.color) {
|
|
183
|
-
if (this.type === 'filled') {
|
|
184
|
-
classList.push(`ck-component__bg-color--${this.color}`);
|
|
185
|
-
} else {
|
|
186
|
-
classList.push(`ck-component__border-color--${this.color}`);
|
|
187
|
-
}
|
|
188
|
-
} // // size
|
|
189
|
-
// if (this.size) classList.push(`rs-component-size__${this.size}`);
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
return classList;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
} // computed
|
|
196
|
-
|
|
197
|
-
}; // export default
|
|
198
|
-
|
|
199
|
-
const _hoisted_1 = {
|
|
200
|
-
class: "ck-button"
|
|
201
|
-
};
|
|
202
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
203
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("button", {
|
|
204
|
-
class: normalizeClass($options.computedClass),
|
|
205
|
-
onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('click', $event))
|
|
206
|
-
}, [renderSlot(_ctx.$slots, "default")], 2)]);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
var css_248z = "\n@import url('../../dist/styles/ck-button.css');\r\n";
|
|
210
|
-
styleInject(css_248z);
|
|
211
|
-
|
|
212
|
-
script.render = render;
|
|
213
|
-
script.__scopeId = "data-v-e00f6d2c";
|
|
214
|
-
|
|
215
|
-
/* eslint-disable import/prefer-default-export */
|
|
216
|
-
// export { default as CkInputText } from './ck-input-text.vue';
|
|
217
|
-
// export { default as CkLabel } from './ck-label.vue';
|
|
218
|
-
// export { default as CkTextarea } from './ck-textarea.vue';
|
|
219
|
-
// export { default as CkSelect } from './ck-select.vue';
|
|
220
|
-
|
|
221
|
-
var components = /*#__PURE__*/Object.freeze({
|
|
222
|
-
__proto__: null,
|
|
223
|
-
CleekSample: script$1,
|
|
224
|
-
CkButton: script
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
// vue components
|
|
228
|
-
|
|
229
|
-
const install = function installCleek(app, options) {
|
|
230
|
-
console.log('arranco paquete');
|
|
231
|
-
console.log('options', options); // vue components
|
|
232
|
-
|
|
233
|
-
Object.entries(components).forEach(_ref => {
|
|
234
|
-
let [componentName, component] = _ref;
|
|
235
|
-
app.component(componentName, component);
|
|
236
|
-
});
|
|
237
|
-
}; // Create module definition for Vue.use()
|
|
238
|
-
|
|
239
|
-
export { script as CkButton, script$1 as CleekSample, install as default };
|
package/dist/cleek.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Cleek=function(e){"use strict";function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],c=!0,i=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);c=!0);}catch(e){i=!0,o=e}finally{try{c||null==n.return||n.return()}finally{if(i)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var r=e.defineComponent({name:"CleekSample",data:function(){return{counter:5,initCounter:5,message:{action:null,amount:null}}},computed:{changedBy:function(){var e=this.message;return e.action?"".concat(e.action," ").concat(e.amount||"").trim():"initialized"}},methods:{increment:function(e){var t="number"!=typeof e?1:e;this.counter+=t,this.message.action="incremented by",this.message.amount=t},decrement:function(e){var t="number"!=typeof e?1:e;this.counter-=t,this.message.action="decremented by",this.message.amount=t},reset:function(){this.counter=this.initCounter,this.message.action="reset",this.message.amount=null}}}),o={class:"cleek-sample"},a=e.createTextVNode(".");function c(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}c("\n.cleek-sample[data-v-0917b8aa] {\n display: block;\n width: 400px;\n margin: 25px auto;\n border: 1px solid #ccc;\n background: #eaeaea;\n text-align: center;\n padding: 25px;\n}\n.cleek-sample p[data-v-0917b8aa] {\n margin: 0 0 1em;\n}\n"),r.render=function(t,n,r,c,i,l){return e.openBlock(),e.createElementBlock("div",o,[e.createElementVNode("p",null,[e.createTextVNode("The counter was "+e.toDisplayString(t.changedBy)+" to ",1),e.createElementVNode("b",null,e.toDisplayString(t.counter),1),a]),e.createElementVNode("button",{onClick:n[0]||(n[0]=function(){return t.increment&&t.increment.apply(t,arguments)})}," Click +1 "),e.createElementVNode("button",{onClick:n[1]||(n[1]=function(){return t.decrement&&t.decrement.apply(t,arguments)})}," Click -1 "),e.createElementVNode("button",{onClick:n[2]||(n[2]=function(e){return t.increment(5)})}," Click +5 "),e.createElementVNode("button",{onClick:n[3]||(n[3]=function(e){return t.decrement(5)})}," Click -5 "),e.createElementVNode("button",{onClick:n[4]||(n[4]=function(){return t.reset&&t.reset.apply(t,arguments)})}," Reset ")])},r.__scopeId="data-v-0917b8aa";var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.group,n=void 0===t?"":t,r=e.groupVertical,o=void 0===r?"":r,a=e.groupBreak,c=void 0===a?"":a,i="";if(c&&c===i)return[];var l=[];return n&&l.push("ck-component__group--".concat(n)),o&&l.push("ck-component__group-vertical--".concat(o)),l},l={props:{type:{type:String,default:""},color:{type:String,default:""},icon:{type:[String,Array],default:""},"icon-package":{type:String,default:""},"icon-right":{type:String,default:""},label:{type:String,default:""},"label-align":{type:String,default:""},group:{type:String,default:""},groupBreak:{type:String,default:"s"},groupVertical:{type:String,default:""}},computed:{computedClass:function(){var e=[];return e.push(i(this)),this.color&&("filled"===this.type?e.push("ck-component__bg-color--".concat(this.color)):e.push("ck-component__border-color--".concat(this.color))),e}}},u={class:"ck-button"};c("\n@import url('../../dist/styles/ck-button.css');\r\n"),l.render=function(t,n,r,o,a,c){return e.openBlock(),e.createElementBlock("div",u,[e.createElementVNode("button",{class:e.normalizeClass(c.computedClass),onClick:n[0]||(n[0]=function(e){return t.$emit("click",e)})},[e.renderSlot(t.$slots,"default")],2)])},l.__scopeId="data-v-e00f6d2c";var s=Object.freeze({__proto__:null,CleekSample:r,CkButton:l}),d=function(e,n){console.log("arranco paquete"),console.log("options",n),Object.entries(s).forEach((function(n){var r=t(n,2),o=r[0],a=r[1];e.component(o,a)}))},p=Object.freeze({__proto__:null,default:d,CleekSample:r,CkButton:l});return Object.entries(p).forEach((function(e){var n=t(e,2),r=n[0],o=n[1];"default"!==r&&(d[r]=o)})),d}(Vue);
|