cleek 1.1.2 → 1.1.6
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 +11 -0
- package/dist/cleek.es.js +4741 -0
- package/dist/cleek.umd.js +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/style.css +1 -0
- package/package.json +11 -61
- package/dist/cleek.esm.js +0 -256
- package/dist/cleek.min.js +0 -1
- package/dist/cleek.ssr.js +0 -304
- 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-button.vue +0 -63
- 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
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<template lang="pug">
|
|
2
|
-
label.rv-switch
|
|
3
|
-
input(
|
|
4
|
-
v-model="localValue"
|
|
5
|
-
type="checkbox"
|
|
6
|
-
@change="$emit('change', $event)"
|
|
7
|
-
)
|
|
8
|
-
span.rv-switch__slider(:class="{ 'is-round': type !== 'square' }")
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
props: {
|
|
14
|
-
value: { type: Boolean, required: true },
|
|
15
|
-
type: { type: String, default: 'round' }, // square
|
|
16
|
-
},
|
|
17
|
-
computed: {
|
|
18
|
-
localValue: {
|
|
19
|
-
get() { return this.value; },
|
|
20
|
-
set(val) { this.$emit('input', val); },
|
|
21
|
-
},
|
|
22
|
-
}, // computed
|
|
23
|
-
}; // export default
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<style lang="stylus" scoped>
|
|
27
|
-
json('./styles/StylusVars.json')
|
|
28
|
-
|
|
29
|
-
.rv-switch
|
|
30
|
-
position relative
|
|
31
|
-
display inline-block
|
|
32
|
-
width 60px
|
|
33
|
-
height 34px
|
|
34
|
-
// Hide default HTML checkbox
|
|
35
|
-
input
|
|
36
|
-
opacity 0
|
|
37
|
-
width 0
|
|
38
|
-
height 0
|
|
39
|
-
&:checked + .rv-switch__slider
|
|
40
|
-
background-color primary
|
|
41
|
-
&:focus + .rv-switch__slider
|
|
42
|
-
box-shadow 0 0 1px primary
|
|
43
|
-
&:checked + .rv-switch__slider:before
|
|
44
|
-
-webkit-transform translateX(26px)
|
|
45
|
-
-ms-transform translateX(26px)
|
|
46
|
-
transform translateX(26px)
|
|
47
|
-
/* The slider */
|
|
48
|
-
.rv-switch__slider
|
|
49
|
-
position absolute
|
|
50
|
-
cursor pointer
|
|
51
|
-
top 0
|
|
52
|
-
left 0
|
|
53
|
-
right 0
|
|
54
|
-
bottom 0
|
|
55
|
-
background-color #ccc
|
|
56
|
-
-webkit-transition .4s
|
|
57
|
-
transition .4s
|
|
58
|
-
&:before
|
|
59
|
-
position absolute
|
|
60
|
-
content ""
|
|
61
|
-
height 26px
|
|
62
|
-
width 26px
|
|
63
|
-
left 4px
|
|
64
|
-
bottom 4px
|
|
65
|
-
background-color white
|
|
66
|
-
-webkit-transition .4s
|
|
67
|
-
transition .4s
|
|
68
|
-
// Rounded sliders
|
|
69
|
-
&.is-round
|
|
70
|
-
border-radius: 34px;
|
|
71
|
-
&:before
|
|
72
|
-
border-radius 50%
|
|
73
|
-
</style>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<template lang="pug">
|
|
2
|
-
.ck-textarea
|
|
3
|
-
ck-label(v-if="label" :label-align="labelAlign") {{ label }}
|
|
4
|
-
textarea(v-model="value")
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
props: {
|
|
10
|
-
modelValue: { type: String, required: true },
|
|
11
|
-
// label
|
|
12
|
-
label: { type: String, default: '' },
|
|
13
|
-
'label-align': { type: String, default: '' },
|
|
14
|
-
},
|
|
15
|
-
computed: {
|
|
16
|
-
value: {
|
|
17
|
-
get() { return this.modelValue; },
|
|
18
|
-
set(val) { this.$emit('update:modelValue', val); },
|
|
19
|
-
},
|
|
20
|
-
}, // computed
|
|
21
|
-
}; // export default
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style lang="stylus" scoped>
|
|
25
|
-
json('./styles/StylusVars.json')
|
|
26
|
-
|
|
27
|
-
.ck-textarea
|
|
28
|
-
> textarea
|
|
29
|
-
min-width 100%
|
|
30
|
-
max-width 100%
|
|
31
|
-
min-height 6rem
|
|
32
|
-
box-sizing border-box
|
|
33
|
-
font-family inherit
|
|
34
|
-
padding globalPadding
|
|
35
|
-
font-size globalFontSize * (85/100)
|
|
36
|
-
border-radius globalBorderRadius
|
|
37
|
-
border 1px solid globalBorderColor
|
|
38
|
-
&:focus-visible
|
|
39
|
-
outline-color primary
|
|
40
|
-
</style>
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { defineComponent } from 'vue';
|
|
3
|
-
|
|
4
|
-
interface SampleData {
|
|
5
|
-
counter: number;
|
|
6
|
-
initCounter: number;
|
|
7
|
-
message: {
|
|
8
|
-
action: string | null;
|
|
9
|
-
amount: number | null;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default /*#__PURE__*/defineComponent({
|
|
14
|
-
name: 'CleekSample', // vue component name
|
|
15
|
-
data(): SampleData {
|
|
16
|
-
return {
|
|
17
|
-
counter: 5,
|
|
18
|
-
initCounter: 5,
|
|
19
|
-
message: {
|
|
20
|
-
action: null,
|
|
21
|
-
amount: null,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
computed: {
|
|
26
|
-
changedBy() {
|
|
27
|
-
const { message } = this as SampleData;
|
|
28
|
-
if (!message.action) return 'initialized';
|
|
29
|
-
return `${message.action} ${message.amount || ''}`.trim();
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
methods: {
|
|
33
|
-
increment(arg: Event | number): void {
|
|
34
|
-
const amount = (typeof arg !== 'number') ? 1 : arg;
|
|
35
|
-
this.counter += amount;
|
|
36
|
-
this.message.action = 'incremented by';
|
|
37
|
-
this.message.amount = amount;
|
|
38
|
-
},
|
|
39
|
-
decrement(arg: Event | number): void {
|
|
40
|
-
const amount = (typeof arg !== 'number') ? 1 : arg;
|
|
41
|
-
this.counter -= amount;
|
|
42
|
-
this.message.action = 'decremented by';
|
|
43
|
-
this.message.amount = amount;
|
|
44
|
-
},
|
|
45
|
-
reset(): void {
|
|
46
|
-
this.counter = this.initCounter;
|
|
47
|
-
this.message.action = 'reset';
|
|
48
|
-
this.message.amount = null;
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<template>
|
|
55
|
-
<div class="cleek-sample">
|
|
56
|
-
<p>The counter was {{ changedBy }} to <b>{{ counter }}</b>.</p>
|
|
57
|
-
<button @click="increment">
|
|
58
|
-
Click +1
|
|
59
|
-
</button>
|
|
60
|
-
<button @click="decrement">
|
|
61
|
-
Click -1
|
|
62
|
-
</button>
|
|
63
|
-
<button @click="increment(5)">
|
|
64
|
-
Click +5
|
|
65
|
-
</button>
|
|
66
|
-
<button @click="decrement(5)">
|
|
67
|
-
Click -5
|
|
68
|
-
</button>
|
|
69
|
-
<button @click="reset">
|
|
70
|
-
Reset
|
|
71
|
-
</button>
|
|
72
|
-
</div>
|
|
73
|
-
</template>
|
|
74
|
-
|
|
75
|
-
<style scoped>
|
|
76
|
-
.cleek-sample {
|
|
77
|
-
display: block;
|
|
78
|
-
width: 400px;
|
|
79
|
-
margin: 25px auto;
|
|
80
|
-
border: 1px solid #ccc;
|
|
81
|
-
background: #eaeaea;
|
|
82
|
-
text-align: center;
|
|
83
|
-
padding: 25px;
|
|
84
|
-
}
|
|
85
|
-
.cleek-sample p {
|
|
86
|
-
margin: 0 0 1em;
|
|
87
|
-
}
|
|
88
|
-
</style>
|