cy-element-ui 1.1.2 → 1.1.4

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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "cy-element-ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "A Component Library for Vue.js.",
5
- "main": "lib/element-ui.common.js",
5
+ "main": "lib/index.js",
6
6
  "files": [
7
7
  "lib",
8
8
  "src",
@@ -0,0 +1,8 @@
1
+ import CyTest from './src/main';
2
+
3
+ /* istanbul ignore next */
4
+ CyTest.install = function(Vue) {
5
+ Vue.component(CyTest.name, CyTest);
6
+ };
7
+
8
+ export default CyTest;
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div class="cy-test" :class="{ 'cy-test--bordered': bordered }">
3
+ <div class="cy-test__header" v-if="title">
4
+ <span class="cy-test__title">{{ title }}</span>
5
+ <span class="cy-test__badge" v-if="badge">{{ badge }}</span>
6
+ </div>
7
+ <div class="cy-test__content">
8
+ <slot></slot>
9
+ </div>
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ export default {
15
+ name: 'CyTest',
16
+
17
+ props: {
18
+ title: String,
19
+ badge: String,
20
+ bordered: {
21
+ type: Boolean,
22
+ default: true
23
+ }
24
+ }
25
+ };
26
+ </script>
@@ -0,0 +1,61 @@
1
+ .cy-test {
2
+ display: inline-block;
3
+ padding: 20px 24px;
4
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
5
+ border-radius: 8px;
6
+ transition: all 0.3s ease;
7
+ box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
8
+ min-width: 300px;
9
+
10
+ &--bordered {
11
+ border: 3px solid #fff;
12
+ box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4), inset 0 0 0 3px rgba(255, 255, 255, 0.3);
13
+ }
14
+
15
+ &__header {
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: space-between;
19
+ margin-bottom: 16px;
20
+ padding-bottom: 12px;
21
+ border-bottom: 2px solid rgba(255, 255, 255, 0.3);
22
+ }
23
+
24
+ &__title {
25
+ font-size: 18px;
26
+ font-weight: 700;
27
+ color: #fff;
28
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
29
+ }
30
+
31
+ &__badge {
32
+ display: inline-block;
33
+ padding: 4px 12px;
34
+ font-size: 12px;
35
+ font-weight: 600;
36
+ color: #667eea;
37
+ background-color: #fff;
38
+ border-radius: 20px;
39
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
40
+ }
41
+
42
+ &__content {
43
+ font-size: 15px;
44
+ color: rgba(255, 255, 255, 0.95);
45
+ line-height: 1.8;
46
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
47
+ background: rgba(255, 255, 255, 0.1);
48
+ padding: 12px 16px;
49
+ border-radius: 6px;
50
+ }
51
+
52
+ &:hover {
53
+ transform: translateY(-2px);
54
+ box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
55
+ }
56
+
57
+ &:active {
58
+ transform: translateY(0);
59
+ box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
60
+ }
61
+ }
@@ -85,3 +85,4 @@
85
85
  @import "./descriptions.scss";
86
86
  @import "./descriptions-item.scss";
87
87
  @import "./result.scss";
88
+ @import "./cy-test.scss";
package/src/index.js CHANGED
@@ -88,7 +88,8 @@ import SkeletonItem from '../packages/skeleton-item/index.js';
88
88
  import Empty from '../packages/empty/index.js';
89
89
  import Descriptions from '../packages/descriptions/index.js';
90
90
  import DescriptionsItem from '../packages/descriptions-item/index.js';
91
- import Result from '../packages/result/index.js';
91
+ import Result from '../packages/result/index.js';
92
+ import CyTest from '../packages/cy-test/index.js';
92
93
  import locale from 'element-ui/src/locale';
93
94
  import CollapseTransition from 'element-ui/src/transitions/collapse-transition';
94
95
 
@@ -176,7 +177,8 @@ const components = [
176
177
  Empty,
177
178
  Descriptions,
178
179
  DescriptionsItem,
179
- Result,
180
+ Result,
181
+ CyTest,
180
182
  CollapseTransition
181
183
  ];
182
184
 
@@ -212,7 +214,7 @@ if (typeof window !== 'undefined' && window.Vue) {
212
214
  }
213
215
 
214
216
  export default {
215
- version: '1.1.1',
217
+ version: '1.1.3',
216
218
  locale: locale.use,
217
219
  i18n: locale.i18n,
218
220
  install,
@@ -305,5 +307,6 @@ export default {
305
307
  Empty,
306
308
  Descriptions,
307
309
  DescriptionsItem,
308
- Result
310
+ Result,
311
+ CyTest
309
312
  };