vueless 0.0.201 → 0.0.203
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/composable.ui/index.js +3 -2
- package/package.json +2 -2
- package/ui.button-link/composables/attrs.composable.js +64 -130
- package/ui.button-link/index.stories.js +2 -4
- package/ui.button-link/index.vue +29 -4
- package/ui.button-toggle/composables/attrs.composable.js +21 -33
- package/ui.button-toggle/configs/default.config.js +2 -2
- package/ui.button-toggle/index.vue +8 -2
- package/ui.button-toggle-item/composables/attrs.composable.js +50 -40
- package/ui.button-toggle-item/configs/default.config.js +1 -1
- package/ui.button-toggle-item/index.stories.js +2 -4
- package/ui.button-toggle-item/index.vue +11 -3
- package/ui.dropdown-badge/composables/attrs.composable.js +45 -45
- package/ui.dropdown-badge/configs/default.config.js +3 -3
- package/ui.dropdown-badge/index.stories.js +2 -4
- package/ui.dropdown-badge/index.vue +8 -2
- package/ui.dropdown-button/composables/attrs.composable.js +45 -45
- package/ui.dropdown-button/configs/default.config.js +3 -3
- package/ui.dropdown-button/index.stories.js +2 -4
- package/ui.dropdown-button/index.vue +8 -2
- package/ui.dropdown-item/index.vue +7 -1
- package/ui.dropdown-link/composables/attrs.composable.js +43 -45
- package/ui.dropdown-link/configs/default.config.js +3 -3
- package/ui.dropdown-link/index.stories.js +2 -4
- package/ui.dropdown-link/index.vue +8 -2
- package/ui.dropdown-list/composables/attrs.composable.js +43 -67
- package/ui.dropdown-list/configs/default.config.js +2 -2
- package/ui.dropdown-list/index.vue +19 -3
- package/ui.form-calendar/components/DayView.vue +4 -4
- package/ui.form-calendar/composables/attrs.composable.js +5 -4
- package/ui.navigation-progress/components/StepperProgress.vue +87 -0
- package/ui.navigation-progress/composables/attrs.composable.js +33 -56
- package/ui.navigation-progress/configs/default.config.js +34 -1
- package/ui.navigation-progress/constants/index.js +5 -0
- package/ui.navigation-progress/index.stories.js +3 -0
- package/ui.navigation-progress/index.vue +55 -9
- package/ui.text-alert/composables/attrs.composable.js +23 -39
- package/ui.text-alert/configs/default.config.js +3 -3
- package/ui.text-alert/index.vue +19 -8
- package/ui.text-badge/composables/attrs.composable.js +25 -36
- package/ui.text-badge/index.stories.js +2 -4
- package/ui.text-badge/index.vue +22 -2
- package/ui.text-block/composables/attrs.composable.js +24 -20
- package/ui.text-block/index.vue +1 -1
- package/ui.text-empty/composables/attrs.composable.js +17 -27
- package/ui.text-empty/configs/default.config.js +1 -1
- package/ui.text-empty/index.stories.js +2 -4
- package/ui.text-empty/index.vue +1 -1
- package/ui.text-file/composables/attrs.composable.js +23 -27
- package/ui.text-file/configs/default.config.js +2 -2
- package/ui.text-file/index.vue +1 -1
- package/ui.text-files/composables/attrs.composable.js +21 -15
- package/ui.text-files/configs/default.config.js +1 -1
- package/ui.text-files/index.vue +7 -3
- package/ui.text-header/composables/attrs.composable.js +28 -22
- package/ui.text-header/index.stories.js +1 -1
- package/ui.text-header/index.vue +1 -1
- package/ui.text-money/composables/attrs.composable.js +21 -48
- package/ui.text-money/index.stories.js +2 -4
- package/ui.text-notify/composables/attrs.composable.js +23 -21
- package/ui.text-notify/index.vue +1 -1
- package/web-types.json +183 -97
- package/ui.navigation-stepper/Docs.mdx +0 -16
- package/ui.navigation-stepper/composables/attrs.composable.js +0 -25
- package/ui.navigation-stepper/configs/default.config.js +0 -13
- package/ui.navigation-stepper/constants/index.js +0 -5
- package/ui.navigation-stepper/index.stories.js +0 -33
- package/ui.navigation-stepper/index.vue +0 -126
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :data-cy="dataCy" v-bind="wrapperAttrs">
|
|
3
|
-
<UHeader :label="title" size="xs" v-bind="titleAttrs" />
|
|
4
|
-
|
|
5
|
-
<div v-bind="stepperAttrs">
|
|
6
|
-
<svg width="100%" height="100%" viewBox="0 0 40 40" v-bind="svgAttrs">
|
|
7
|
-
<defs>
|
|
8
|
-
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="0%" v-bind="gradientAttrs">
|
|
9
|
-
<stop offset="0%" :stop-color="setStepperColor" />
|
|
10
|
-
<stop offset="100%" :stop-color="setStepperColor" />
|
|
11
|
-
</linearGradient>
|
|
12
|
-
</defs>
|
|
13
|
-
|
|
14
|
-
<circle
|
|
15
|
-
cx="20"
|
|
16
|
-
cy="20"
|
|
17
|
-
r="15.91549430918954"
|
|
18
|
-
fill="transparent"
|
|
19
|
-
stroke-width="4"
|
|
20
|
-
v-bind="ringAttrs"
|
|
21
|
-
></circle>
|
|
22
|
-
|
|
23
|
-
<circle
|
|
24
|
-
cx="20"
|
|
25
|
-
cy="20"
|
|
26
|
-
r="15.91549430918954"
|
|
27
|
-
fill="transparent"
|
|
28
|
-
stroke="url(#gradient)"
|
|
29
|
-
stroke-width="4"
|
|
30
|
-
:stroke-dasharray="fillPercentage"
|
|
31
|
-
stroke-dashoffset="0"
|
|
32
|
-
></circle>
|
|
33
|
-
<g v-bind="countAttrs">
|
|
34
|
-
<text y="45%" transform="translate(0, 2)">
|
|
35
|
-
<tspan x="50%" text-anchor="middle">{{ step }}</tspan>
|
|
36
|
-
</text>
|
|
37
|
-
</g>
|
|
38
|
-
</svg>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script setup>
|
|
44
|
-
import { computed } from "vue";
|
|
45
|
-
import colors from "tailwindcss/colors";
|
|
46
|
-
|
|
47
|
-
import UHeader from "../ui.text-header";
|
|
48
|
-
import UIService from "../service.ui";
|
|
49
|
-
import { GRAY_COLORS } from "../preset.tailwind/constants";
|
|
50
|
-
|
|
51
|
-
import { UStepper } from "./constants/index";
|
|
52
|
-
import defaultConfig from "./configs/default.config";
|
|
53
|
-
import { useAttrs } from "./composables/attrs.composable";
|
|
54
|
-
|
|
55
|
-
/* Should be a string for correct web-types gen */
|
|
56
|
-
defineOptions({ name: "UStepper", inheritAttrs: false });
|
|
57
|
-
|
|
58
|
-
const props = defineProps({
|
|
59
|
-
/**
|
|
60
|
-
* Set component title.
|
|
61
|
-
*/
|
|
62
|
-
title: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: "",
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Set step number.
|
|
69
|
-
*/
|
|
70
|
-
step: {
|
|
71
|
-
type: Number,
|
|
72
|
-
default: UIService.get(defaultConfig, UStepper).default.step,
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Icon color.
|
|
77
|
-
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, white
|
|
78
|
-
*/
|
|
79
|
-
color: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: UIService.get(defaultConfig, UStepper).default.color,
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Set total number of steps.
|
|
86
|
-
*/
|
|
87
|
-
totalSteps: {
|
|
88
|
-
type: Number,
|
|
89
|
-
default: null,
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Component ui config object.
|
|
94
|
-
*/
|
|
95
|
-
config: {
|
|
96
|
-
type: Object,
|
|
97
|
-
default: () => ({}),
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Sets data-cy attribute for automated testing.
|
|
102
|
-
*/
|
|
103
|
-
dataCy: {
|
|
104
|
-
type: String,
|
|
105
|
-
default: "",
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
const { wrapperAttrs, titleAttrs, stepperAttrs, ringAttrs, countAttrs, gradientAttrs, svgAttrs } =
|
|
110
|
-
useAttrs(props);
|
|
111
|
-
|
|
112
|
-
const setStepperColor = computed(() => {
|
|
113
|
-
return colors[props.color]
|
|
114
|
-
? colors[props.color][500]
|
|
115
|
-
: GRAY_COLORS.includes(props.color)
|
|
116
|
-
? colors[props.color][900]
|
|
117
|
-
: colors.zinc[900];
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
const fillPercentage = computed(() => {
|
|
121
|
-
const maxCountPercent = 100;
|
|
122
|
-
const activePercent = (props.step / props.totalSteps) * maxCountPercent;
|
|
123
|
-
|
|
124
|
-
return `${activePercent} ${maxCountPercent}`;
|
|
125
|
-
});
|
|
126
|
-
</script>
|