@propelinc/citrus-ui 0.3.12 → 0.3.14
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/dist/citrus-ui.common.js +153 -46
- package/dist/citrus-ui.common.js.map +1 -1
- package/dist/citrus-ui.css +1 -1
- package/dist/citrus-ui.umd.js +153 -46
- package/dist/citrus-ui.umd.js.map +1 -1
- package/dist/citrus-ui.umd.min.js +3 -7
- package/dist/citrus-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CListItem.vue +6 -4
- package/src/components/CTextLink.vue +54 -0
- package/src/index.d.ts +1 -0
- package/src/index.ts +2 -0
package/package.json
CHANGED
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
v-on="$listeners"
|
|
9
9
|
>
|
|
10
10
|
<div class="list-item__icon">
|
|
11
|
-
<
|
|
12
|
-
|
|
11
|
+
<slot name="icon">
|
|
12
|
+
<font-awesome-icon v-if="icon" data-test="list-item-icon" fixed-width :icon="icon" />
|
|
13
|
+
</slot>
|
|
13
14
|
</div>
|
|
14
15
|
|
|
15
16
|
<div class="list-item__content" data-test="list-item-content">
|
|
@@ -17,8 +18,9 @@
|
|
|
17
18
|
</div>
|
|
18
19
|
|
|
19
20
|
<div class="list-item__action" data-test="list-item-action">
|
|
20
|
-
<
|
|
21
|
-
|
|
21
|
+
<slot name="action">
|
|
22
|
+
<font-awesome-icon v-if="tappable" :icon="faChevronRight" />
|
|
23
|
+
</slot>
|
|
22
24
|
</div>
|
|
23
25
|
</component>
|
|
24
26
|
</template>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="component"
|
|
4
|
+
:to="to"
|
|
5
|
+
:href="href"
|
|
6
|
+
:target="target"
|
|
7
|
+
:tabindex="isRoleButton ? 0 : null"
|
|
8
|
+
:role="isRoleButton ? 'button' : null"
|
|
9
|
+
class="text-link"
|
|
10
|
+
:class="{ 'text-link--light': light }"
|
|
11
|
+
v-on="$listeners"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</component>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
import { Component, Vue, Prop } from 'vue-property-decorator';
|
|
19
|
+
import { RawLocation } from 'vue-router';
|
|
20
|
+
|
|
21
|
+
@Component({ name: 'CTextLink' })
|
|
22
|
+
export default class CTextLink extends Vue {
|
|
23
|
+
@Prop([String, Object]) to?: RawLocation;
|
|
24
|
+
@Prop(String) href?: string;
|
|
25
|
+
@Prop(String) target?: string;
|
|
26
|
+
@Prop({ type: Boolean, default: false }) light!: boolean;
|
|
27
|
+
|
|
28
|
+
get component(): string {
|
|
29
|
+
if (this.to) {
|
|
30
|
+
return 'router-link';
|
|
31
|
+
} else {
|
|
32
|
+
return 'a';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get isRoleButton(): boolean {
|
|
37
|
+
return !this.to && !this.href;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="less" scoped>
|
|
43
|
+
@import '~@/styles/variables.less';
|
|
44
|
+
|
|
45
|
+
.text-link {
|
|
46
|
+
color: @color-accent-blue;
|
|
47
|
+
font-weight: @font-weight-bold;
|
|
48
|
+
text-decoration: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.text-link--light {
|
|
52
|
+
color: @color-white;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
package/src/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export const CSkeletonLoaderCircle: Component;
|
|
|
23
23
|
export const CSkeletonLoaderText: Component;
|
|
24
24
|
export const CTextArea: Component;
|
|
25
25
|
export const CTextField: Component;
|
|
26
|
+
export const CTextLink: Component;
|
|
26
27
|
|
|
27
28
|
export const Theme: typeof _Theme;
|
|
28
29
|
export const Colors: typeof _Colors;
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ import _CSkeletonLoaderCircle from '@/components/CSkeletonLoaderCircle.vue';
|
|
|
19
19
|
import _CSkeletonLoaderText from '@/components/CSkeletonLoaderText.vue';
|
|
20
20
|
import _CTextArea from '@/components/CTextArea.vue';
|
|
21
21
|
import _CTextField from '@/components/CTextField.vue';
|
|
22
|
+
import _CTextLink from '@/components/CTextLink.vue';
|
|
22
23
|
import _Icons from '@/theme/icons';
|
|
23
24
|
|
|
24
25
|
import '@/styles/core.less';
|
|
@@ -46,3 +47,4 @@ export const CSkeletonLoaderCircle = _CSkeletonLoaderCircle;
|
|
|
46
47
|
export const CSkeletonLoaderText = _CSkeletonLoaderText;
|
|
47
48
|
export const CTextArea = _CTextArea;
|
|
48
49
|
export const CTextField = _CTextField;
|
|
50
|
+
export const CTextLink = _CTextLink;
|